1 | <?php |
||
31 | class ReflectionCompositeFactory extends ReflectorFactory |
||
32 | { |
||
33 | const REFLECTION_OBJECT = ReflectionComposite::class; |
||
34 | |||
35 | /** |
||
36 | * @var PHPNativeReflector |
||
37 | */ |
||
38 | protected $reflector; |
||
39 | |||
40 | /** |
||
41 | * @var ReflectionComposite |
||
42 | */ |
||
43 | protected $object; |
||
44 | |||
45 | /** |
||
46 | * @var ReflectionCompositeProviderInterface |
||
47 | */ |
||
48 | protected $provider; |
||
49 | |||
50 | /** |
||
51 | * Creates a new ReflectionCompositeFactory from the given |
||
52 | * classname |
||
53 | * |
||
54 | * @param string $classname The class to build a reflect upon |
||
55 | * @return ReflectionCompositeFactory |
||
56 | */ |
||
57 | 20 | public static function fromClassName(string $classname) |
|
65 | |||
66 | /** |
||
67 | * Constructs the Factory with the given reflector and Composite |
||
68 | * provider |
||
69 | * |
||
70 | * @param PHPNativeReflectionClass $reflect |
||
71 | * @param ReflectionCompositeProviderInterface $provider |
||
72 | */ |
||
73 | 20 | public function __construct |
|
82 | |||
83 | /** |
||
84 | * Builds the ReflectionComposite from the provided parameters |
||
85 | * |
||
86 | * @return ReflectionComposite |
||
87 | */ |
||
88 | 20 | public function build() |
|
126 | |||
127 | /** |
||
128 | * Loops through the list methods or properties adding them to the |
||
129 | * Composite |
||
130 | * |
||
131 | * @param string $name |
||
132 | * @param bool $checkFile |
||
133 | * @param string $singular |
||
|
|||
134 | */ |
||
135 | 20 | protected function addItems |
|
177 | |||
178 | /** |
||
179 | * Adds a super class / interface / trait to this Composite |
||
180 | * |
||
181 | * @param string $group The type of superclass (parent, etc...) |
||
182 | * @param PHPNativeReflectionClass $reflect |
||
183 | * @param string $method |
||
184 | */ |
||
185 | 4 | protected function addInheritance |
|
199 | |||
200 | /** |
||
201 | * Uses a ReflectionPropertyFactory to build a ReflectionProperty |
||
202 | * |
||
203 | * @param ReflectionPropertyFactory $factory |
||
204 | * @return ReflectionProperty |
||
205 | */ |
||
206 | 20 | protected function buildProperty |
|
220 | |||
221 | /** |
||
222 | * Uses a ReflectionMethodFactory to build a ReflectionMethod |
||
223 | * |
||
224 | * @param ReflectionMethodFactory $factory |
||
225 | * @return ReflectionMethod |
||
226 | */ |
||
227 | 20 | protected function buildMethod(ReflectionMethodFactory $factory) |
|
232 | } |
||
233 | |||
234 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.