diff --git a/src/Job/CopyFilesJob.php b/src/Job/CopyFilesJob.php index a50f84c..ceedaab 100644 --- a/src/Job/CopyFilesJob.php +++ b/src/Job/CopyFilesJob.php @@ -39,7 +39,7 @@ final public function execute(JobExecution $jobExecution): void throw UnexpectedValueException::type('string|string[]', $config); } - $transformLocation = $this->transformLocation ?? fn ($sourceLocation) => $sourceLocation; + $transformLocation = $this->transformLocation ?? fn($sourceLocation) => $sourceLocation; foreach ($locations as $sourceLocation) { $destinationLocation = $transformLocation($sourceLocation); if (!\is_string($destinationLocation)) { diff --git a/src/Job/MoveFilesJob.php b/src/Job/MoveFilesJob.php index e46bc00..ebc8aba 100644 --- a/src/Job/MoveFilesJob.php +++ b/src/Job/MoveFilesJob.php @@ -40,7 +40,7 @@ final public function execute(JobExecution $jobExecution): void throw UnexpectedValueException::type('string|string[]', $config); } - $transformLocation = $this->transformLocation ?? fn ($sourceLocation) => $sourceLocation; + $transformLocation = $this->transformLocation ?? fn($sourceLocation) => $sourceLocation; foreach ($locations as $sourceLocation) { $destinationLocation = $transformLocation($sourceLocation); if (!\is_string($destinationLocation)) { diff --git a/tests/Job/CopyFilesJobTest.php b/tests/Job/CopyFilesJobTest.php index 8b029af..3e01888 100644 --- a/tests/Job/CopyFilesJobTest.php +++ b/tests/Job/CopyFilesJobTest.php @@ -64,7 +64,7 @@ public function testWithPathTransformation(): void $source->write('source-file.txt', 'SOURCE TO BE COPIED'); $destination = new Filesystem(new InMemoryFilesystemAdapter()); $location = new StaticValueParameterAccessor('source-file.txt'); - $transformDestination = fn () => 'destination-file.txt'; + $transformDestination = fn() => 'destination-file.txt'; self::assertFalse( $destination->has('source-file.txt'), @@ -179,7 +179,7 @@ public function testWrongDestinationType(): void $source->write('file.txt', 'FILE'); $destination = new Filesystem(new InMemoryFilesystemAdapter()); $location = new StaticValueParameterAccessor('source'); - $transformation = fn () => null; + $transformation = fn() => null; $job = new CopyFilesJob($location, $source, $destination, $transformation); $job->execute(JobExecution::createRoot('123456', 'phpunit-copy-file')); diff --git a/tests/Job/MoveFilesJobTest.php b/tests/Job/MoveFilesJobTest.php index 0808c38..7c678ef 100644 --- a/tests/Job/MoveFilesJobTest.php +++ b/tests/Job/MoveFilesJobTest.php @@ -66,7 +66,7 @@ public function testWithPathTransformation(): void $source->write('source-file.txt', 'SOURCE TO BE MOVED'); $destination = new Filesystem(new InMemoryFilesystemAdapter()); $location = new StaticValueParameterAccessor('source-file.txt'); - $transformDestination = fn () => 'destination-file.txt'; + $transformDestination = fn() => 'destination-file.txt'; self::assertFalse( $destination->has('source-file.txt'), @@ -218,7 +218,7 @@ public function testWrongDestinationType(): void $source->write('file.txt', 'FILE'); $destination = new Filesystem(new InMemoryFilesystemAdapter()); $location = new StaticValueParameterAccessor('source'); - $transformation = fn () => null; + $transformation = fn() => null; $job = new MoveFilesJob($location, $source, $destination, $transformation); $job->execute(JobExecution::createRoot('123456', 'phpunit-move-file')); diff --git a/tests/Scheduler/FileFoundSchedulerTest.php b/tests/Scheduler/FileFoundSchedulerTest.php index dc846fc..4b0e343 100644 --- a/tests/Scheduler/FileFoundSchedulerTest.php +++ b/tests/Scheduler/FileFoundSchedulerTest.php @@ -7,8 +7,8 @@ use League\Flysystem\Filesystem; use League\Flysystem\InMemory\InMemoryFilesystemAdapter; use League\Flysystem\UnableToCheckExistence; -use Yokai\Batch\Bridge\League\Flysystem\Scheduler\FileFoundScheduler; use PHPUnit\Framework\TestCase; +use Yokai\Batch\Bridge\League\Flysystem\Scheduler\FileFoundScheduler; use Yokai\Batch\Exception\UnexpectedValueException; use Yokai\Batch\Job\Parameters\StaticValueParameterAccessor; use Yokai\Batch\JobExecution;