Skip to content

Commit c07aa9f

Browse files
authored
ignore internal properties (#381)
* ignore internal properties
1 parent 7441d2e commit c07aa9f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/FormBuilderBundle/Configuration/Configuration.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,16 @@ public function getAvailableConstraints(): array
118118
return $parameter->getName() === $propertyName;
119119
}));
120120

121+
if (count($constructorParameters) === 0) {
122+
continue;
123+
}
124+
125+
/** @var \ReflectionParameter $constructorParameter */
126+
$constructorParameter = $constructorParameters[0];
121127
$constructorParameterType = null;
122-
if (count($constructorParameters) > 0) {
123-
/** @var \ReflectionParameter $constructorParameter */
124-
$constructorParameter = $constructorParameters[0];
125-
if ($constructorParameter->hasType() && $constructorParameter->getType() instanceof \ReflectionNamedType) {
126-
$constructorParameterType = $constructorParameter->getType()->getName();
127-
}
128+
129+
if ($constructorParameter->hasType() && $constructorParameter->getType() instanceof \ReflectionNamedType) {
130+
$constructorParameterType = $constructorParameter->getType()->getName();
128131
}
129132

130133
if ($constructorParameterType !== null) {

0 commit comments

Comments
 (0)