1 | <?php |
||
15 | class PHPFile implements File |
||
16 | { |
||
17 | /** |
||
18 | * @var \SplFileInfo |
||
19 | */ |
||
20 | private $fileInfo; |
||
21 | |||
22 | /** |
||
23 | * @param \SplFileInfo $fileInfo |
||
24 | */ |
||
25 | public function __construct(\SplFileInfo $fileInfo) |
||
29 | |||
30 | /** |
||
31 | * @return string[] |
||
32 | * @throws UnexpectedValueException |
||
33 | */ |
||
34 | public function readArray() |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | private function readFile() |
||
51 | |||
52 | /** |
||
53 | * @param string $value |
||
54 | * @param string $expectedType |
||
55 | * @throws UnexpectedValueException |
||
56 | */ |
||
57 | private function verifyType($value, $expectedType) |
||
65 | |||
66 | /** |
||
67 | * @param string[] $items |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function writeArray(array $items) |
||
82 | |||
83 | /** |
||
84 | * @param array $items |
||
85 | * @return string |
||
86 | */ |
||
87 | private function generateFileContentForArray(array $items) |
||
103 | |||
104 | /** |
||
105 | * @return \SplFileInfo |
||
106 | */ |
||
107 | public function getInfo() |
||
111 | |||
112 | /** |
||
113 | * @param array $items |
||
|
|||
114 | * @return boolean |
||
115 | */ |
||
116 | private function isZippedFile() |
||
125 | } |
||
126 |
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.