1 | <?php |
||
22 | class ArrayVO extends ValueObject implements Iterator, Arrayable, Countable |
||
23 | { |
||
24 | /** |
||
25 | * ArrayValueObject constructor. |
||
26 | * |
||
27 | * @param $value |
||
28 | */ |
||
29 | 48 | public function __construct(array $value) |
|
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 1 | public function __toString() |
|
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function toArray() |
||
49 | |||
50 | /** |
||
51 | * @param array $array |
||
52 | * @return static |
||
53 | */ |
||
54 | 5 | public static function fromArray(array $array) |
|
58 | |||
59 | /** |
||
60 | * @param $key |
||
61 | * @return bool |
||
62 | */ |
||
63 | 2 | public function keyExists($key) |
|
67 | |||
68 | /** |
||
69 | * @return static |
||
70 | */ |
||
71 | 1 | public function dropFirst() |
|
75 | |||
76 | /** |
||
77 | * @return static |
||
78 | */ |
||
79 | 1 | public function dropLast() |
|
83 | |||
84 | /** |
||
85 | * @param Notation $notation |
||
86 | * @return bool |
||
87 | */ |
||
88 | 1 | public function findJsonNotation(Notation $notation) |
|
92 | |||
93 | /** |
||
94 | * @param array $array |
||
95 | * @return bool|mixed |
||
96 | */ |
||
97 | 1 | public function findArray(array $array) |
|
101 | |||
102 | /** |
||
103 | * Iterates through an array of values and finds a key. If it makes it to the final value, |
||
104 | * it returns what ever value matches that key. |
||
105 | * |
||
106 | * @param ArrayValueObject $arrayValueObject |
||
107 | * @return bool|mixed |
||
108 | */ |
||
109 | 2 | public function findArrayVO(ArrayVO $arrayValueObject) |
|
119 | |||
120 | /** |
||
121 | * @param string|int $key |
||
122 | * @return bool|mixed |
||
123 | */ |
||
124 | 2 | public function getKey($key) |
|
128 | |||
129 | /** |
||
130 | * @return mixed |
||
131 | */ |
||
132 | 3 | public function current() |
|
136 | |||
137 | /** |
||
138 | * @return mixed |
||
139 | */ |
||
140 | 2 | public function key() |
|
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | 1 | public function valid() |
|
152 | |||
153 | /** |
||
154 | * @return $this |
||
155 | */ |
||
156 | 2 | public function next() |
|
161 | |||
162 | /** |
||
163 | * @return $this |
||
164 | */ |
||
165 | 1 | public function rewind() |
|
170 | |||
171 | /** |
||
172 | * @return int |
||
173 | */ |
||
174 | 1 | public function count() |
|
178 | |||
179 | /** |
||
180 | * @return bool |
||
181 | */ |
||
182 | 1 | public function isEmpty() |
|
186 | |||
187 | /** |
||
188 | * @return mixed |
||
189 | */ |
||
190 | 1 | public function getFirstKey() |
|
194 | |||
195 | /** |
||
196 | * @return mixed |
||
197 | */ |
||
198 | 3 | public function getLastKey() |
|
202 | |||
203 | /** |
||
204 | * @return bool |
||
205 | */ |
||
206 | 2 | public function isLast() |
|
210 | |||
211 | /** |
||
212 | * @param ValueObject $object |
||
213 | * @return bool |
||
214 | */ |
||
215 | 2 | public function equals(ValueObject $object) |
|
223 | |||
224 | } |
||
225 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.