11<?php
2+ declare (strict_types=1 );
23
34/**
45 * @source https://github.com/cakephp/cakephp
910use PHPStan \Reflection \ClassMemberReflection ;
1011use PHPStan \Reflection \ClassReflection ;
1112use PHPStan \Reflection \MethodReflection ;
13+ use PHPStan \Reflection \TrivialParametersAcceptor ;
1214use PHPStan \TrinaryLogic ;
1315use PHPStan \Type \ObjectType ;
16+ use PHPStan \Type \Type ;
1417
1518class TableFindByPropertyMethodReflection implements MethodReflection
1619{
17- /** @var string */
18- private $ name ;
20+ /**
21+ * @var string
22+ */
23+ private string $ name ;
1924
20- /** @var \PHPStan\Reflection\ClassReflection */
21- private $ declaringClass ;
25+ /**
26+ * @var \PHPStan\Reflection\ClassReflection
27+ */
28+ private ClassReflection $ declaringClass ;
2229
30+ /**
31+ * @param string $name
32+ * @param \PHPStan\Reflection\ClassReflection $declaringClass
33+ */
2334 public function __construct (string $ name , ClassReflection $ declaringClass )
2435 {
2536 $ this ->name = $ name ;
2637 $ this ->declaringClass = $ declaringClass ;
2738 }
2839
40+ /**
41+ * @return \PHPStan\Reflection\ClassReflection
42+ */
2943 public function getDeclaringClass (): ClassReflection
3044 {
3145 return $ this ->declaringClass ;
3246 }
3347
48+ /**
49+ * @return \PHPStan\Reflection\ClassMemberReflection
50+ */
3451 public function getPrototype (): ClassMemberReflection
3552 {
3653 return $ this ;
3754 }
3855
56+ /**
57+ * @return bool
58+ */
3959 public function isStatic (): bool
4060 {
4161 return false ;
4262 }
4363
4464 /**
45- * @return \PHPStan\Reflection\ParameterReflection[]
65+ * @return array< \PHPStan\Reflection\ParameterReflection>
4666 */
4767 public function getParameters (): array
4868 {
4969 return [];
5070 }
5171
72+ /**
73+ * @return bool
74+ */
5275 public function isVariadic (): bool
5376 {
5477 return false ;
5578 }
5679
80+ /**
81+ * @return bool
82+ */
5783 public function isPrivate (): bool
5884 {
5985 return false ;
6086 }
6187
88+ /**
89+ * @return bool
90+ */
6291 public function isPublic (): bool
6392 {
6493 return true ;
6594 }
6695
96+ /**
97+ * @return string
98+ */
6799 public function getName (): string
68100 {
69101 return $ this ->name ;
70102 }
71103
72- public function getReturnType (): \PHPStan \Type \ObjectType
104+ /**
105+ * @return \PHPStan\Type\ObjectType
106+ */
107+ public function getReturnType (): ObjectType
73108 {
74109 return new ObjectType ('\Cake\ORM\Query ' );
75110 }
76111
112+ /**
113+ * @return string|null
114+ */
77115 public function getDocComment (): ?string
78116 {
79117 return null ;
@@ -84,35 +122,53 @@ public function getDocComment(): ?string
84122 */
85123 public function getVariants (): array
86124 {
87- return [new \ PHPStan \ Reflection \ TrivialParametersAcceptor ()];
125+ return [new TrivialParametersAcceptor ()];
88126 }
89127
90- public function isDeprecated (): \PHPStan \TrinaryLogic
128+ /**
129+ * @return \PHPStan\TrinaryLogic
130+ */
131+ public function isDeprecated (): TrinaryLogic
91132 {
92133 return TrinaryLogic::createNo ();
93134 }
94135
136+ /**
137+ * @return string|null
138+ */
95139 public function getDeprecatedDescription (): ?string
96140 {
97141 return null ;
98142 }
99143
100- public function isFinal (): \PHPStan \TrinaryLogic
144+ /**
145+ * @return \PHPStan\TrinaryLogic
146+ */
147+ public function isFinal (): TrinaryLogic
101148 {
102149 return TrinaryLogic::createNo ();
103150 }
104151
105- public function isInternal (): \PHPStan \TrinaryLogic
152+ /**
153+ * @return \PHPStan\TrinaryLogic
154+ */
155+ public function isInternal (): TrinaryLogic
106156 {
107157 return TrinaryLogic::createNo ();
108158 }
109159
110- public function getThrowType (): ?\PHPStan \Type \Type
160+ /**
161+ * @return \PHPStan\Type\Type|null
162+ */
163+ public function getThrowType (): ?Type
111164 {
112165 return null ;
113166 }
114167
115- public function hasSideEffects (): \PHPStan \TrinaryLogic
168+ /**
169+ * @return \PHPStan\TrinaryLogic
170+ */
171+ public function hasSideEffects (): TrinaryLogic
116172 {
117173 return TrinaryLogic::createNo ();
118174 }
0 commit comments