File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ public function getPrototype(): ClassMemberReflection
7272 $ prototypeDeclaringClass = $ this ->reflectionProvider ->getClass ($ prototypeMethod ->getDeclaringClass ()->getName ());
7373 }
7474
75+ if (!$ prototypeDeclaringClass ->hasNativeMethod ($ prototypeMethod ->getName ())) {
76+ return $ this ;
77+ }
78+
7579 $ tentativeReturnType = null ;
7680 if ($ prototypeMethod ->getTentativeReturnType () !== null ) {
7781 $ tentativeReturnType = TypehintHelper::decideTypeFromReflection ($ prototypeMethod ->getTentativeReturnType ());
Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ public function getPrototype(): ClassMemberReflection
115115 $ prototypeDeclaringClass = $ this ->reflectionProvider ->getClass ($ prototypeMethod ->getDeclaringClass ()->getName ());
116116 }
117117
118+ if (!$ prototypeDeclaringClass ->hasNativeMethod ($ prototypeMethod ->getName ())) {
119+ return $ this ;
120+ }
121+
118122 $ tentativeReturnType = null ;
119123 if ($ prototypeMethod ->getTentativeReturnType () !== null ) {
120124 $ tentativeReturnType = TypehintHelper::decideTypeFromReflection ($ prototypeMethod ->getTentativeReturnType ());
You can’t perform that action at this time.
0 commit comments