1 | <?php |
||
10 | class Definitions implements Arrayable, \Iterator |
||
11 | { |
||
12 | /** @var Map */ |
||
13 | private $definitions; |
||
14 | |||
15 | 12 | public function __construct($contents = []) |
|
19 | |||
20 | 12 | private function parse($contents) |
|
29 | |||
30 | 7 | public function toArray() |
|
34 | |||
35 | 1 | public function size() |
|
39 | |||
40 | /** |
||
41 | * Returns the schema for the given field. |
||
42 | * |
||
43 | * @param string $name |
||
44 | * |
||
45 | * @return Schema |
||
46 | */ |
||
47 | 1 | public function get($name) |
|
55 | |||
56 | /** |
||
57 | * Sets the field. |
||
58 | * |
||
59 | * @param string name |
||
60 | * @param Schema $schame |
||
|
|||
61 | */ |
||
62 | 1 | public function set($name, Schema $schema) |
|
66 | |||
67 | /** |
||
68 | * Removes the given field. |
||
69 | * |
||
70 | * @param string $name |
||
71 | */ |
||
72 | 1 | public function remove($name) |
|
76 | |||
77 | /** |
||
78 | * Returns definitions has a schema with the given name. |
||
79 | * |
||
80 | * @param string $name |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | 1 | public function has($name) |
|
88 | |||
89 | /** |
||
90 | * Returns whether the given schema exists. |
||
91 | * |
||
92 | * @param Schema $schema |
||
93 | * |
||
94 | * @return bool |
||
95 | */ |
||
96 | 1 | public function contains(Schema $schema) |
|
100 | |||
101 | public function current() |
||
105 | |||
106 | public function key() |
||
110 | |||
111 | public function next() |
||
115 | |||
116 | public function rewind() |
||
120 | |||
121 | public function valid() |
||
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.