Skip to content

Commit 3a6cb0a

Browse files
committed
Fix: Parameter order to comply with PHP 8+ requirements
1 parent 6b285bd commit 3a6cb0a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Resolvers/InputResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ classInstance: $object,
5151
continue;
5252
}
5353

54-
$chooseContext->addProperty(new ChoosePropertyContext($name, $chooseContext, $collection));
54+
$chooseContext->addProperty(new ChoosePropertyContext($name, $collection, $chooseContext));
5555
$chooseContext->getProperty($name)?->setInputName($matchInput['name']);
5656

5757
$resolvedValue = $matchInput['value'];

src/Resolvers/OutputResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ classInstance: $object,
4242
continue;
4343
}
4444

45-
$chooseContext->addProperty(new ChoosePropertyContext($name, $chooseContext, $collection));
45+
$chooseContext->addProperty(new ChoosePropertyContext($name, $collection, $chooseContext));
4646
$chooseContext->getProperty($name)?->setOutPutNames($matchData['names']);
4747
$resolvedValue = $matchData['value'];
4848

src/Serialize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function setGroups(array|string $groups): SerializeContext
2929

3030
public function withGroups(array|string $groups): static
3131
{
32-
$this->getContext()->setGroups((array)$groups);
32+
$this->getContext()?->setGroups((array)$groups);
3333
return $this;
3434
}
3535

src/Support/Context/ChoosePropertyContext.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class ChoosePropertyContext
1616

1717
public function __construct(
1818
private readonly string $name,
19-
private readonly ?ChooseSerializeContext $parent = null,
2019
private readonly DataCollection $dataCollection,
20+
private readonly ?ChooseSerializeContext $parent = null,
2121
) {
2222

2323
}
2424

2525
public static function build(DataCollection $collection, ChooseSerializeContext $context,DataCollection $dataCollection): ChoosePropertyContext
2626
{
27-
return new self($collection->getName(), $context, $dataCollection);
27+
return new self($collection->getName(), $dataCollection, $context);
2828
}
2929

3030
public function getDataCollection() : DataCollection

0 commit comments

Comments
 (0)