-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check session data is complete before attempting to download a file (#…
- Loading branch information
Showing
7 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace MichalSpacekCz\Test\Training; | ||
|
||
use DateTimeInterface; | ||
use MichalSpacekCz\ShouldNotHappenException; | ||
use MichalSpacekCz\Training\Files\TrainingFilesStorage; | ||
use Override; | ||
|
||
class TrainingFilesNullStorage extends TrainingFilesStorage | ||
{ | ||
|
||
private string $filesDir = ''; | ||
|
||
|
||
public function setFilesDir(string $filesDir): void | ||
{ | ||
if (!str_ends_with($filesDir, '/')) { | ||
throw new ShouldNotHappenException("The directory {$filesDir} does not end with /"); | ||
} | ||
$this->filesDir = $filesDir; | ||
} | ||
|
||
|
||
#[Override] | ||
public function getFilesDir(DateTimeInterface $date): string | ||
{ | ||
return $this->filesDir; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters