Skip to content

Commit d4e027a

Browse files
committed
Apply fixes from StyleCI
1 parent 02c61c3 commit d4e027a

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/Illuminate/Support/Testing/Fakes/BusFake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ protected function serializeAndRestoreCommand($command)
788788
/**
789789
* Return the command representation that should be stored.
790790
*
791-
* @param mixed $command
791+
* @param mixed $command
792792
* @return mixed
793793
*/
794794
protected function getCommandRepresentation($command)

tests/Support/SupportTestingBusFakeTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -676,13 +676,13 @@ public function testCanSerializeAndRestoreCommands($commandFunctionName, $assert
676676

677677
// without setting the serialization, the job should return the value passed in
678678
$this->fake->{$commandFunctionName}(new BusFakeJobWithSerialization('hello'));
679-
$this->fake->{$assertionFunctionName}(BusFakeJobWithSerialization::class, fn($command) => $command->value === 'hello');
679+
$this->fake->{$assertionFunctionName}(BusFakeJobWithSerialization::class, fn ($command) => $command->value === 'hello');
680680

681681
// when enabling the serializeAndRestore property, job has value modified
682682
$serializingBusFake->{$commandFunctionName}(new BusFakeJobWithSerialization('hello'));
683683
$serializingBusFake->{$assertionFunctionName}(
684684
BusFakeJobWithSerialization::class,
685-
fn($command) => $command->value === 'hello-serialized-unserialized'
685+
fn ($command) => $command->value === 'hello-serialized-unserialized'
686686
);
687687
}
688688

@@ -704,7 +704,7 @@ public function testCanSerializeAndRestoreCommandsInBatch()
704704
$this->fake->batch([
705705
new BusFakeJobWithSerialization('hello'),
706706
])->dispatch();
707-
$this->fake->assertBatched(function(PendingBatchFake $batchedCollection) {
707+
$this->fake->assertBatched(function (PendingBatchFake $batchedCollection) {
708708
return $batchedCollection->jobs->count() === 1 && $batchedCollection->jobs->first()->value === 'hello';
709709
});
710710

@@ -713,7 +713,7 @@ public function testCanSerializeAndRestoreCommandsInBatch()
713713
new BusFakeJobWithSerialization('hello'),
714714
])->dispatch();
715715

716-
$serializingBusFake->assertBatched(function(PendingBatchFake $batchedCollection) {
716+
$serializingBusFake->assertBatched(function (PendingBatchFake $batchedCollection) {
717717
return $batchedCollection->jobs->count() === 1 && $batchedCollection->jobs->first()->value === 'hello';
718718
});
719719
}
@@ -744,7 +744,6 @@ class ThirdJob
744744
//
745745
}
746746

747-
748747
class BusFakeJobWithSerialization
749748
{
750749
use Queueable;
@@ -755,11 +754,11 @@ public function __construct(public $value)
755754

756755
public function __serialize(): array
757756
{
758-
return ['value' => $this->value .'-serialized'];
757+
return ['value' => $this->value.'-serialized'];
759758
}
760759

761760
public function __unserialize(array $data): void
762761
{
763-
$this->value = $data['value'] .'-unserialized';
762+
$this->value = $data['value'].'-unserialized';
764763
}
765764
}

tests/Support/SupportTestingQueueFakeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public function testItCanSerializeAndRestoreJobs()
379379
{
380380
// confirm that the default behavior is maintained
381381
$this->fake->push(new JobWithSerialization('hello'));
382-
$this->fake->assertPushed(JobWithSerialization::class, fn($job) => $job->value === 'hello');
382+
$this->fake->assertPushed(JobWithSerialization::class, fn ($job) => $job->value === 'hello');
383383

384384
$job = new JobWithSerialization('hello');
385385

@@ -389,7 +389,7 @@ public function testItCanSerializeAndRestoreJobs()
389389

390390
$fake->assertPushed(
391391
JobWithSerialization::class,
392-
fn($job) => $job->value === 'hello-serialized-unserialized'
392+
fn ($job) => $job->value === 'hello-serialized-unserialized'
393393
);
394394
}
395395
}
@@ -453,11 +453,11 @@ public function __construct(public $value)
453453

454454
public function __serialize(): array
455455
{
456-
return ['value' => $this->value .'-serialized'];
456+
return ['value' => $this->value.'-serialized'];
457457
}
458458

459459
public function __unserialize(array $data): void
460460
{
461-
$this->value = $data['value'] .'-unserialized';
461+
$this->value = $data['value'].'-unserialized';
462462
}
463463
}

0 commit comments

Comments
 (0)