Skip to content

Commit 6423d8a

Browse files
committed
[PropertyInfo] Fix ReflectionExtractor::getTypesFromConstructor
1 parent 2c4e215 commit 6423d8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ public function getTypesFromConstructor(string $class, string $property): ?array
194194
if (!$reflectionType = $reflectionParameter->getType()) {
195195
return null;
196196
}
197-
if (!$type = $this->extractFromReflectionType($reflectionType, $reflectionConstructor)) {
197+
if (!$types = $this->extractFromReflectionType($reflectionType, $reflectionConstructor->getDeclaringClass())) {
198198
return null;
199199
}
200200

201-
return [$type];
201+
return $types;
202202
}
203203

204204
private function getReflectionParameterFromConstructor(string $property, \ReflectionMethod $reflectionConstructor): ?\ReflectionParameter

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy