File tree Expand file tree Collapse file tree 3 files changed +38
-5
lines changed Expand file tree Collapse file tree 3 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 55
66use PHPStan \Broker \Broker ;
77use PHPStan \Reflection \ClassReflection ;
8+ use PHPStan \Reflection \ClassMemberReflection ;
9+ use PHPStan \Reflection \FunctionVariant ;
810use PHPStan \Reflection \MethodReflection ;
911use PHPStan \Type \ObjectType ;
1012use PHPStan \Type \Type ;
@@ -55,7 +57,7 @@ public function isPublic(): bool
5557 return true ;
5658 }
5759
58- public function getPrototype (): MethodReflection
60+ public function getPrototype (): ClassMemberReflection
5961 {
6062 return $ this ;
6163 }
@@ -97,4 +99,18 @@ public function getReturnType(): Type
9799 {
98100 return new ObjectType (QueryResultInterface::class);
99101 }
102+
103+ /**
104+ * @return \PHPStan\Reflection\ParametersAcceptor[]
105+ */
106+ public function getVariants (): array
107+ {
108+ return [
109+ new FunctionVariant (
110+ $ this ->getParameters (),
111+ $ this ->isVariadic (),
112+ $ this ->getReturnType ()
113+ ),
114+ ];
115+ }
100116}
Original file line number Diff line number Diff line change 44namespace SaschaEgerer \PhpstanTypo3 \Reflection ;
55
66use PHPStan \Reflection \ParameterReflection ;
7+ use PHPStan \Reflection \PassedByReference ;
78use PHPStan \Type \IntegerType ;
89use PHPStan \Type \Type ;
910use PHPStan \Type \TypeCombinator ;
@@ -46,13 +47,13 @@ public function getType(): Type
4647 );
4748 }
4849
49- public function isPassedByReference (): bool
50+ public function isVariadic (): bool
5051 {
5152 return false ;
5253 }
5354
54- public function isVariadic (): bool
55+ public function passedByReference (): PassedByReference
5556 {
56- return false ;
57+ return PassedByReference:: createNo () ;
5758 }
5859}
Original file line number Diff line number Diff line change 55
66use PHPStan \Broker \Broker ;
77use PHPStan \Reflection \ClassReflection ;
8+ use PHPStan \Reflection \ClassMemberReflection ;
9+ use PHPStan \Reflection \FunctionVariant ;
810use PHPStan \Reflection \MethodReflection ;
911use PHPStan \Type \ObjectType ;
1012use PHPStan \Type \Type ;
@@ -55,7 +57,7 @@ public function isPublic(): bool
5557 return true ;
5658 }
5759
58- public function getPrototype (): MethodReflection
60+ public function getPrototype (): ClassMemberReflection
5961 {
6062 return $ this ;
6163 }
@@ -97,4 +99,18 @@ public function getReturnType(): Type
9799 {
98100 return TypeCombinator::addNull (new ObjectType ($ this ->getModelName ()));
99101 }
102+
103+ /**
104+ * @return \PHPStan\Reflection\ParametersAcceptor[]
105+ */
106+ public function getVariants (): array
107+ {
108+ return [
109+ new FunctionVariant (
110+ $ this ->getParameters (),
111+ $ this ->isVariadic (),
112+ $ this ->getReturnType ()
113+ ),
114+ ];
115+ }
100116}
You can’t perform that action at this time.
0 commit comments