1 | <?php |
||
13 | class AutoLoader |
||
14 | { |
||
15 | /** |
||
16 | * @var string The namespace prefix for this instance. |
||
17 | */ |
||
18 | protected $namespace = ''; |
||
19 | |||
20 | /** |
||
21 | * @var string The filesystem prefix to use for this instance |
||
22 | */ |
||
23 | protected $path = ''; |
||
24 | |||
25 | /** |
||
26 | * Build the instance of the autoloader |
||
27 | * |
||
28 | * @param string $namespace The prefixed namespace this instance will load |
||
29 | * @param string $path The filesystem path to the root of the namespace |
||
30 | */ |
||
31 | public function __construct($namespace, $path) |
||
36 | |||
37 | /** |
||
38 | * Try to load a class |
||
39 | * |
||
40 | * @param string $class The class name to load |
||
|
|||
41 | * |
||
42 | * @return boolean If the loading was successful |
||
43 | */ |
||
44 | public function load($className) |
||
66 | |||
67 | /** |
||
68 | * Register the autoloader to PHP |
||
69 | * |
||
70 | * @return boolean The status of the registration |
||
71 | */ |
||
72 | public function register() |
||
76 | |||
77 | /** |
||
78 | * Unregister the autoloader to PHP |
||
79 | * |
||
80 | * @return boolean The status of the unregistration |
||
81 | */ |
||
82 | public function unregister() |
||
86 | } |
||
87 |
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.