Skip to content

Commit 40d9f11

Browse files
committed
minor #1453 CS Update (kbond)
This PR was merged into the 2.x branch. Discussion ---------- CS Update | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Updates to the latest Symfony CS rules. Refs: PHP-CS-Fixer/PHP-CS-Fixer#7773 & symfony/symfony#53612 Commits ------- aad4e17 minor: update cs
2 parents 9c6e3f7 + aad4e17 commit 40d9f11

37 files changed

+53
-53
lines changed

src/Autocomplete/src/Doctrine/EntitySearchUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(private EntityMetadataFactory $metadataFactory)
2727
/**
2828
* Adapted from easycorp/easyadmin EntityRepository.
2929
*/
30-
public function addSearchClause(QueryBuilder $queryBuilder, string $query, string $entityClass, array $searchableProperties = null): void
30+
public function addSearchClause(QueryBuilder $queryBuilder, string $query, string $entityClass, ?array $searchableProperties = null): void
3131
{
3232
$entityMetadata = $this->metadataFactory->create($entityClass);
3333

src/Autocomplete/src/Form/ChoiceList/Loader/ExtraLazyChoiceLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ public function __construct(
2727
) {
2828
}
2929

30-
public function loadChoiceList(callable $value = null): ChoiceListInterface
30+
public function loadChoiceList(?callable $value = null): ChoiceListInterface
3131
{
3232
return $this->choiceList ??= new ArrayChoiceList([], $value);
3333
}
3434

35-
public function loadChoicesForValues(array $values, callable $value = null): array
35+
public function loadChoicesForValues(array $values, ?callable $value = null): array
3636
{
3737
$choices = $this->decorated->loadChoicesForValues($values, $value);
3838
$this->choiceList = new ArrayChoiceList($choices, $value);
3939

4040
return $choices;
4141
}
4242

43-
public function loadValuesForChoices(array $choices, callable $value = null): array
43+
public function loadValuesForChoices(array $choices, ?callable $value = null): array
4444
{
4545
$values = $this->decorated->loadValuesForChoices($choices, $value);
4646
$this->loadChoicesForValues($values, $value);

src/Autocomplete/tests/Integration/Doctrine/EntitySearchUtilTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testItCanSearchOnRelationFields(): void
6161
/**
6262
* @return array<Product>
6363
*/
64-
private function callAddSearchClass(string $search, array $searchableProperties = null): array
64+
private function callAddSearchClass(string $search, ?array $searchableProperties = null): array
6565
{
6666
/** @var ManagerRegistry $registry */
6767
$registry = self::getContainer()->get('doctrine');

src/LazyImage/src/BlurHash/BlurHash.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BlurHash implements BlurHashInterface
2323
{
2424
private $imageManager;
2525

26-
public function __construct(ImageManager $imageManager = null)
26+
public function __construct(?ImageManager $imageManager = null)
2727
{
2828
$this->imageManager = $imageManager;
2929
}

src/LiveComponent/src/Attribute/AsLiveComponent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ final class AsLiveComponent extends AsTwigComponent
3737
* @param int $urlReferenceType Which type of URL should be generated for the given route. Use the constants from UrlGeneratorInterface (default: absolute path, e.g. "/dir/file").
3838
*/
3939
public function __construct(
40-
string $name = null,
41-
string $template = null,
40+
?string $name = null,
41+
?string $template = null,
4242
private ?string $defaultAction = null,
4343
bool $exposePublicProps = true,
4444
string $attributesVar = 'attributes',

src/LiveComponent/src/Attribute/LiveProp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function __construct(
9696
*
9797
* @var string|string[]|null
9898
*/
99-
private null|string|array $onUpdated = null,
99+
private string|array|null $onUpdated = null,
100100

101101
/**
102102
* If true, this property will be synchronized with a query parameter
@@ -193,7 +193,7 @@ public function acceptUpdatesFromParent(): bool
193193
return $this->updateFromParent;
194194
}
195195

196-
public function onUpdated(): null|string|array
196+
public function onUpdated(): string|array|null
197197
{
198198
return $this->onUpdated;
199199
}

src/LiveComponent/src/ComponentToolsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public function setLiveResponder(LiveResponder $liveResponder): void
3333
$this->liveResponder = $liveResponder;
3434
}
3535

36-
public function emit(string $eventName, array $data = [], string $componentName = null): void
36+
public function emit(string $eventName, array $data = [], ?string $componentName = null): void
3737
{
3838
$this->liveResponder->emit($eventName, $data, $componentName);
3939
}
4040

41-
public function emitUp(string $eventName, array $data = [], string $componentName = null): void
41+
public function emitUp(string $eventName, array $data = [], ?string $componentName = null): void
4242
{
4343
$this->liveResponder->emitUp($eventName, $data, $componentName);
4444
}

src/LiveComponent/src/LiveResponder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class LiveResponder
2828
*/
2929
private array $browserEventsToDispatch = [];
3030

31-
public function emit(string $eventName, array $data = [], string $componentName = null): void
31+
public function emit(string $eventName, array $data = [], ?string $componentName = null): void
3232
{
3333
$this->eventsToEmit[] = [
3434
'event' => $eventName,
@@ -38,7 +38,7 @@ public function emit(string $eventName, array $data = [], string $componentName
3838
];
3939
}
4040

41-
public function emitUp(string $eventName, array $data = [], string $componentName = null): void
41+
public function emitUp(string $eventName, array $data = [], ?string $componentName = null): void
4242
{
4343
$this->eventsToEmit[] = [
4444
'event' => $eventName,

src/LiveComponent/src/Metadata/LivePropMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function getFormat(): ?string
112112
return $this->liveProp->format();
113113
}
114114

115-
public function onUpdated(): null|string|array
115+
public function onUpdated(): string|array|null
116116
{
117117
return $this->liveProp->onUpdated();
118118
}

src/LiveComponent/src/Test/InteractsWithLiveComponents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
trait InteractsWithLiveComponents
2222
{
23-
protected function createLiveComponent(string $name, array $data = [], KernelBrowser $client = null): TestLiveComponent
23+
protected function createLiveComponent(string $name, array $data = [], ?KernelBrowser $client = null): TestLiveComponent
2424
{
2525
if (!$this instanceof KernelTestCase) {
2626
throw new \LogicException(sprintf('The "%s" trait can only be used on "%s" classes.', __TRAIT__, KernelTestCase::class));

0 commit comments

Comments
 (0)