| @@ 136-149 (lines=14) @@ | ||
| 133 | * @return static |
|
| 134 | * <p>(Mutable) Return this Arrayy object, with the prepended value.</p> |
|
| 135 | */ |
|
| 136 | public function prepend($value, $key = null): Arrayy |
|
| 137 | { |
|
| 138 | if ($value instanceof static) { |
|
| 139 | foreach ($value as $valueTmp) { |
|
| 140 | parent::prepend($valueTmp, $key); |
|
| 141 | } |
|
| 142 | ||
| 143 | return $this; |
|
| 144 | } |
|
| 145 | ||
| 146 | $this->checkTypeWrapper($value); |
|
| 147 | ||
| 148 | return parent::prepend($value, $key); |
|
| 149 | } |
|
| 150 | ||
| 151 | /** |
|
| 152 | * Append a (key) + value to the current array. |
|
| @@ 160-173 (lines=14) @@ | ||
| 157 | * @return static |
|
| 158 | * <p>(Mutable) Return this Arrayy object, with the appended values.</p> |
|
| 159 | */ |
|
| 160 | public function append($value, $key = null): Arrayy |
|
| 161 | { |
|
| 162 | if ($value instanceof static) { |
|
| 163 | foreach ($value as $valueTmp) { |
|
| 164 | parent::append($valueTmp, $key); |
|
| 165 | } |
|
| 166 | ||
| 167 | return $this; |
|
| 168 | } |
|
| 169 | ||
| 170 | $this->checkTypeWrapper($value); |
|
| 171 | ||
| 172 | return parent::append($value, $key); |
|
| 173 | } |
|
| 174 | ||
| 175 | /** |
|
| 176 | * Returns the values from given property or method. |
|