1 | <?php |
||
11 | class Parameters extends AbstractModel implements Arrayable, \Iterator { |
||
12 | |||
13 | use RefPart; |
||
14 | |||
15 | /** @var ArrayList */ |
||
16 | private $parameters; |
||
17 | |||
18 | 13 | public function __construct($contents = []) { |
|
21 | |||
22 | 13 | private function parse($contents) { |
|
34 | |||
35 | 9 | public function toArray() { |
|
42 | |||
43 | 1 | public function size() { |
|
46 | |||
47 | /** |
||
48 | * Searches whether a parameter with the given name exists |
||
49 | * |
||
50 | * @param string $name |
||
51 | * @return bool |
||
52 | */ |
||
53 | 1 | public function searchByName($name) { |
|
58 | |||
59 | /** |
||
60 | * Returns parameter with the given name if it exists |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @return Parameter|void |
||
64 | */ |
||
65 | 1 | public function findByName($name) { |
|
72 | |||
73 | /** |
||
74 | * Searches for the parameter with the given name. Creates a parameter with the given name |
||
75 | * if none exists |
||
76 | * |
||
77 | * @param string $name |
||
78 | * @return Parameter |
||
79 | */ |
||
80 | public function getByName($name) { |
||
90 | |||
91 | /** |
||
92 | * Searches whether a parameter with the given unique combination exists |
||
93 | * |
||
94 | * @param string $name |
||
95 | * @param string $id |
||
|
|||
96 | * @return bool |
||
97 | */ |
||
98 | public function search($name, $in) { |
||
103 | |||
104 | 1 | public function find($name, $in) { |
|
111 | |||
112 | 1 | public function get($name, $in) { |
|
123 | |||
124 | /** |
||
125 | * Adds a parameter |
||
126 | * |
||
127 | * @param Parameter $param |
||
128 | */ |
||
129 | 1 | public function add(Parameter $param) { |
|
132 | |||
133 | /** |
||
134 | * Removes a parameter |
||
135 | * |
||
136 | * @param Parameter $param |
||
137 | */ |
||
138 | 1 | public function remove(Parameter $param) { |
|
141 | |||
142 | /** |
||
143 | * Returns whether a given parameter exists |
||
144 | * |
||
145 | * @param Parameter $param |
||
146 | * @return bool |
||
147 | */ |
||
148 | 1 | public function contains(Parameter $param) { |
|
151 | |||
152 | public function current() { |
||
155 | |||
156 | public function key() { |
||
159 | |||
160 | public function next() { |
||
163 | |||
164 | public function rewind() { |
||
167 | |||
168 | public function valid() { |
||
171 | } |
||
172 |
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.