Skip to content

Commit

Permalink
Run new linters
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin255 committed Jun 8, 2024
1 parent 3c66afb commit 728ca3f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN docker-php-ext-install zip opcache \
&& echo 'xdebug.mode=coverage' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini


RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.5.8 \
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.7.6 \
&& mkdir -p /.composer && chmod -Rf 777 /.composer


Expand Down
2 changes: 1 addition & 1 deletion src/FileSystemFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private function __construct()
/**
* Creates new FileSystemHelperInterface instance with default settings.
*/
public static function create(string $baseFolder = null): FileSystemHelper
public static function create(?string $baseFolder = null): FileSystemHelper
{
return new FileSystemHelperImpl($baseFolder);
}
Expand Down
2 changes: 1 addition & 1 deletion src/FileSystemHelperImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class FileSystemHelperImpl implements FileSystemHelper
{
private readonly ?string $baseFolder;

public function __construct(string $baseFolder = null)
public function __construct(?string $baseFolder = null)
{
$validatedBaseFolder = null;

Expand Down
16 changes: 8 additions & 8 deletions tests/FileSystemHelperImplTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testEmptyBasePathUnexistedInConstructException(): void
/**
* @dataProvider provideRemove
*/
public function testRemove(string|\SplFileInfo $file, string $baseDir = null, \Exception $exception = null): void
public function testRemove(string|\SplFileInfo $file, ?string $baseDir = null, ?\Exception $exception = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand Down Expand Up @@ -104,7 +104,7 @@ public static function provideRemove(): array
/**
* @dataProvider provideRemoveIfExists
*/
public function testRemoveIfExists(string|\SplFileInfo $file, string $baseDir = null, \Exception $exception = null): void
public function testRemoveIfExists(string|\SplFileInfo $file, ?string $baseDir = null, ?\Exception $exception = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand Down Expand Up @@ -182,7 +182,7 @@ public static function provideRemoveIfExists(): array
/**
* @dataProvider provideCopyFile
*/
public function testCopyFile(string|\SplFileInfo $from, string|\SplFileInfo $to, \Exception $exception = null, string $baseDir = null): void
public function testCopyFile(string|\SplFileInfo $from, string|\SplFileInfo $to, ?\Exception $exception = null, ?string $baseDir = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand Down Expand Up @@ -305,7 +305,7 @@ public function testCopyDir(): void
/**
* @dataProvider provideRenameFile
*/
public function testRenameFile(string|\SplFileInfo $from, string|\SplFileInfo $to, \Exception $exception = null, string $baseDir = null): void
public function testRenameFile(string|\SplFileInfo $from, string|\SplFileInfo $to, ?\Exception $exception = null, ?string $baseDir = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand Down Expand Up @@ -429,7 +429,7 @@ public function testRenameDir(): void
/**
* @dataProvider provideMkdir
*/
public function testMkdir(\SplFileInfo|string $name, int $permissions = null, \Exception $exception = null, string $baseDir = null): void
public function testMkdir(\SplFileInfo|string $name, ?int $permissions = null, ?\Exception $exception = null, ?string $baseDir = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand All @@ -445,7 +445,7 @@ public function testMkdir(\SplFileInfo|string $name, int $permissions = null, \E

if (!$exception) {
$this->assertDirectoryExists($this->convertPathToString($name));
$this->assertDirectoryHasPermissions($permissions ?: 0777, $name);
$this->assertDirectoryHasPermissions($permissions ?? 0777, $name);
}
}

Expand Down Expand Up @@ -495,7 +495,7 @@ public static function provideMkdir(): array
/**
* @dataProvider provideMkdirIfNotExist
*/
public function testMkdirIfNotExist(\SplFileInfo|string $name, int $permissions = null, \Exception $exception = null, string $baseDir = null): void
public function testMkdirIfNotExist(\SplFileInfo|string $name, ?int $permissions = null, ?\Exception $exception = null, ?string $baseDir = null): void
{
$helper = new FileSystemHelperImpl($baseDir);

Expand All @@ -511,7 +511,7 @@ public function testMkdirIfNotExist(\SplFileInfo|string $name, int $permissions

if (!$exception) {
$this->assertDirectoryExists($this->convertPathToString($name));
$this->assertDirectoryHasPermissions($permissions ?: 0777, $name);
$this->assertDirectoryHasPermissions($permissions ?? 0777, $name);
}
}

Expand Down

0 comments on commit 728ca3f

Please sign in to comment.