| 1 | <?php |
||
| 7 | class Container |
||
| 8 | { |
||
| 9 | protected $repositories = []; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Create a container with some repositories. |
||
| 13 | * |
||
| 14 | * @param FilesystemInterface $filesystem |
||
|
|
|||
| 15 | * @param string $class |
||
| 16 | */ |
||
| 17 | public static function __callStatic($name, $args) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns a repository. |
||
| 44 | * |
||
| 45 | * @param string $name |
||
| 46 | * |
||
| 47 | * @return Repository |
||
| 48 | */ |
||
| 49 | public function __get($name) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Adds a new repository to the container. |
||
| 60 | * |
||
| 61 | * @param string $name |
||
| 62 | * @param Repository $repository |
||
| 63 | * |
||
| 64 | * @return self |
||
| 65 | */ |
||
| 66 | public function __set($name, Repository $repository) |
||
| 70 | } |
||
| 71 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.