File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/Symfony/Contracts/Service Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,19 @@ public static function getSubscribedServices(): array
42
42
continue ;
43
43
}
44
44
45
- if (self ::class === $ method ->getDeclaringClass ()->name && ($ returnType = $ method ->getReturnType ()) && !$ returnType ->isBuiltin ()) {
46
- $ services [self ::class.':: ' .$ method ->name ] = '? ' .($ returnType instanceof \ReflectionNamedType ? $ returnType ->getName () : $ returnType );
45
+ if (self ::class !== $ method ->getDeclaringClass ()->name ) {
46
+ continue ;
47
+ }
48
+
49
+ if (!($ returnType = $ method ->getReturnType ()) instanceof \ReflectionNamedType) {
50
+ continue ;
47
51
}
52
+
53
+ if ($ returnType ->isBuiltin ()) {
54
+ continue ;
55
+ }
56
+
57
+ $ services [self ::class.':: ' .$ method ->name ] = '? ' .$ returnType ->getName ();
48
58
}
49
59
50
60
return $ services ;
You can’t perform that action at this time.
0 commit comments