diff --git a/src/Internal/Hydration/ObjectHydrator.php b/src/Internal/Hydration/ObjectHydrator.php index 7a3e968147..850e4c194b 100644 --- a/src/Internal/Hydration/ObjectHydrator.php +++ b/src/Internal/Hydration/ObjectHydrator.php @@ -552,7 +552,7 @@ protected function hydrateRowData(array $row, array &$result): void $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); foreach ($rowData['newObjects'] as $objIndex => $newObject) { - $obj = $newObject['obj'] ?? null; + $obj = $newObject['obj']; if ($scalarCount === 0 && count($rowData['newObjects']) === 1) { $result[$resultKey] = $obj; diff --git a/src/Query/Parser.php b/src/Query/Parser.php index 8dad109e84..5c9e9820f5 100644 --- a/src/Query/Parser.php +++ b/src/Query/Parser.php @@ -1675,9 +1675,7 @@ public function NewObjectArg(): mixed } if ($token->type === TokenType::T_NEW) { - $expression = $this->NewObjectExpression(); - - return $expression; + return $this->NewObjectExpression(); } return $this->ScalarExpression(); diff --git a/src/Query/ResultSetMapping.php b/src/Query/ResultSetMapping.php index 5c93882a9c..c95b089a73 100644 --- a/src/Query/ResultSetMapping.php +++ b/src/Query/ResultSetMapping.php @@ -568,7 +568,7 @@ public function addNewObjectAsArgument(string|int $alias, string|int $objOwner, $this->nestedNewObjectArguments = array_merge( [$alias => $owner], - $this->nestedNewObjectArguments + $this->nestedNewObjectArguments, ); return $this; diff --git a/src/Query/SqlWalker.php b/src/Query/SqlWalker.php index 5a0409f748..e8b0ddd6c8 100644 --- a/src/Query/SqlWalker.php +++ b/src/Query/SqlWalker.php @@ -81,7 +81,6 @@ class SqlWalker */ private int $newObjectCounter = 0; - /** * Contains nesting levels of new objects arguments * diff --git a/tests/Tests/Models/DDC6573/DDC6573Currency.php b/tests/Tests/Models/DDC6573/DDC6573Currency.php index 72370de4c6..9aa5b0eb9e 100644 --- a/tests/Tests/Models/DDC6573/DDC6573Currency.php +++ b/tests/Tests/Models/DDC6573/DDC6573Currency.php @@ -14,4 +14,4 @@ public function getCode(): string { return $this->code; } -} \ No newline at end of file +} diff --git a/tests/Tests/Models/DDC6573/DDC6573Item.php b/tests/Tests/Models/DDC6573/DDC6573Item.php index 8e25f5d6ff..29b99a2d6f 100644 --- a/tests/Tests/Models/DDC6573/DDC6573Item.php +++ b/tests/Tests/Models/DDC6573/DDC6573Item.php @@ -41,4 +41,4 @@ public function getPrice(): DDC6573Money { return new DDC6573Money($this->priceAmount, new DDC6573Currency($this->priceCurrency)); } -} \ No newline at end of file +} diff --git a/tests/Tests/Models/DDC6573/DDC6573Money.php b/tests/Tests/Models/DDC6573/DDC6573Money.php index 46d7c99ec5..f0d0d59ea4 100644 --- a/tests/Tests/Models/DDC6573/DDC6573Money.php +++ b/tests/Tests/Models/DDC6573/DDC6573Money.php @@ -21,4 +21,4 @@ public function getCurrency(): DDC6573Currency { return $this->currency; } -} \ No newline at end of file +} diff --git a/tests/Tests/ORM/Functional/Ticket/DDC6573Test.php b/tests/Tests/ORM/Functional/Ticket/DDC6573Test.php index fdeb9d28a4..4802e596bf 100644 --- a/tests/Tests/ORM/Functional/Ticket/DDC6573Test.php +++ b/tests/Tests/ORM/Functional/Ticket/DDC6573Test.php @@ -105,4 +105,4 @@ public function testShouldSupportsBasicUsage(int $hydrationMode): void self::assertEquals($this->fixtures[1]->getPrice()->getCurrency(), $result[2]); self::assertEquals($this->fixtures[2]->getPrice()->getCurrency(), $result[1]); } -} \ No newline at end of file +}