@@ -27,6 +27,7 @@ discard block |
||
| 27 | 27 | * @param mixed $element element to add. |
| 28 | 28 | * |
| 29 | 29 | * @since 1.0 |
| 30 | + * @return void |
|
| 30 | 31 | */ |
| 31 | 32 | public function add($element): void; |
| 32 | 33 | |
@@ -55,6 +56,7 @@ discard block |
||
| 55 | 56 | * @param mixed $value Value to pad if input is less than `size`. |
| 56 | 57 | * |
| 57 | 58 | * @since 1.0 |
| 59 | + * @return void |
|
| 58 | 60 | */ |
| 59 | 61 | public function pad(int $size, $value = null): void; |
| 60 | 62 | |
@@ -21,6 +21,7 @@ |
||
| 21 | 21 | * @param int|string $key element index. |
| 22 | 22 | * |
| 23 | 23 | * @since 1.0 |
| 24 | + * @return void |
|
| 24 | 25 | */ |
| 25 | 26 | public function removeAt($key): void; |
| 26 | 27 | |
@@ -20,10 +20,19 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function of($elements): self; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 23 | 26 | public function add(string $key, $element): void; |
| 24 | 27 | |
| 28 | + /** |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 25 | 31 | public function keysToLowerCase(): void; |
| 26 | 32 | |
| 33 | + /** |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 27 | 36 | public function keysToUpperCase(): void; |
| 28 | 37 | |
| 29 | 38 | /** |
@@ -19,6 +19,7 @@ discard block |
||
| 19 | 19 | * Clear all data from the collection. |
| 20 | 20 | * |
| 21 | 21 | * @since 1.0 |
| 22 | + * @return void |
|
| 22 | 23 | */ |
| 23 | 24 | public function clear(): void; |
| 24 | 25 | |
@@ -50,6 +51,7 @@ discard block |
||
| 50 | 51 | * @param mixed $element element to be removed. |
| 51 | 52 | * |
| 52 | 53 | * @since 1.0 |
| 54 | + * @return void |
|
| 53 | 55 | */ |
| 54 | 56 | public function remove($element): void; |
| 55 | 57 | |
@@ -59,6 +61,7 @@ discard block |
||
| 59 | 61 | * @param mixed $element element to be removed. |
| 60 | 62 | * |
| 61 | 63 | * @since 1.0 |
| 64 | + * @return void |
|
| 62 | 65 | */ |
| 63 | 66 | public function removeAll($element): void; |
| 64 | 67 | } |
| 65 | 68 | \ No newline at end of file |
@@ -54,6 +54,7 @@ discard block |
||
| 54 | 54 | * ``` |
| 55 | 55 | * |
| 56 | 56 | * @param array ...$elements elements. |
| 57 | + * @param integer $elements |
|
| 57 | 58 | * |
| 58 | 59 | * @return int the new number of elements in the array. |
| 59 | 60 | * |
@@ -70,7 +71,7 @@ discard block |
||
| 70 | 71 | * positive then the collection is padded on the right, if it's negative then |
| 71 | 72 | * on the left. If the absolute value of size is less than or equal to |
| 72 | 73 | * the length of the collection then no padding takes place. |
| 73 | - * @param mixed $value Value to pad if input is less than `size`. |
|
| 74 | + * @param integer $value Value to pad if input is less than `size`. |
|
| 74 | 75 | * |
| 75 | 76 | * @since 1.0 |
| 76 | 77 | */ |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Remove first occurrence of a specified element from the collection. |
| 33 | 33 | * |
| 34 | - * @param mixed $element element to be removed. |
|
| 34 | + * @param integer $element element to be removed. |
|
| 35 | 35 | * |
| 36 | 36 | * @since 1.0 |
| 37 | 37 | */ |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * Remove all occurrences of a specified element from the collection. |
| 46 | 46 | * |
| 47 | - * @param mixed $element element to be removed. |
|
| 47 | + * @param integer $element element to be removed. |
|
| 48 | 48 | * |
| 49 | 49 | * @since 1.0 |
| 50 | 50 | */ |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | * </code> |
| 207 | 207 | * |
| 208 | 208 | * @param callback $by the callback function. |
| 209 | - * @param mixed $withInitial [optional] if the optional initial is available, it will |
|
| 209 | + * @param integer $withInitial [optional] if the optional initial is available, it will |
|
| 210 | 210 | * be used at the beginning of the process, or as a final result in case |
| 211 | 211 | * the collection is empty. |
| 212 | 212 | * </p |
@@ -225,6 +225,9 @@ discard block |
||
| 225 | 225 | return array_key_exists($key, $this->elements); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | + /** |
|
| 229 | + * @param integer $element |
|
| 230 | + */ |
|
| 228 | 231 | public function has($element): bool { |
| 229 | 232 | return in_array($element, $this->elements); |
| 230 | 233 | } |
@@ -257,7 +260,7 @@ discard block |
||
| 257 | 260 | /** |
| 258 | 261 | * Searches the collection for a given value and returns the last corresponding key if successful. |
| 259 | 262 | * |
| 260 | - * @param mixed $element value to look for at the collection. |
|
| 263 | + * @param integer $element value to look for at the collection. |
|
| 261 | 264 | * @param bool $strictTypeCheck determines if strict comparison (===) should be used during the search. |
| 262 | 265 | * |
| 263 | 266 | * @return false|int|string key of an element or `false` if element not found. |