File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/FormBuilderBundle/Configuration Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments