File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Config/Parser/MetadataParser Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -556,22 +556,22 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
556
556
/** @var Metadata\Arg[] $argAnnotations */
557
557
$ argAnnotations = self ::getMetadataMatching ($ metadatas , Metadata \Arg::class);
558
558
559
+ if ($ reflector instanceof ReflectionMethod) {
560
+ $ args = self ::guessArgs ($ reflectionClass , $ reflector );
561
+ }
562
+
559
563
foreach ($ argAnnotations as $ arg ) {
560
- $ args [$ arg ->name ] = ['type ' => $ arg ->type ];
564
+ $ args [$ arg ->name ] ?? = ['type ' => $ arg ->type ];
561
565
562
566
if (isset ($ arg ->description )) {
563
567
$ args [$ arg ->name ]['description ' ] = $ arg ->description ;
564
568
}
565
569
566
570
if (isset ($ arg ->default )) {
567
- $ args [$ arg ->name ]['defaultValue ' ] = $ arg ->default ;
571
+ $ args [$ arg ->name ]['defaultValue ' ] ?? = $ arg ->default ;
568
572
}
569
573
}
570
574
571
- if (empty ($ argAnnotations ) && $ reflector instanceof ReflectionMethod) {
572
- $ args = self ::guessArgs ($ reflectionClass , $ reflector );
573
- }
574
-
575
575
if (!empty ($ args )) {
576
576
$ fieldConfiguration ['args ' ] = $ args ;
577
577
}
You can’t perform that action at this time.
0 commit comments