| @@ 123-141 (lines=19) @@ | ||
| 120 | * @psalm-param TKey|null $key | |
| 121 | * @psalm-return static<TKey,T> | |
| 122 | */ | |
| 123 | public function append($value, $key = null): Arrayy | |
| 124 |     { | |
| 125 | if ( | |
| 126 | $value instanceof self | |
| 127 | && | |
| 128 | !$value instanceof TypeInterface | |
| 129 |         ) { | |
| 130 |             foreach ($value as $valueTmp) { | |
| 131 | parent::append($valueTmp, $key); | |
| 132 | } | |
| 133 | ||
| 134 | return $this; | |
| 135 | } | |
| 136 | ||
| 137 | $return = parent::append($value, $key); | |
| 138 | $this->array = $return->array; | |
| 139 | ||
| 140 | return $this; | |
| 141 | } | |
| 142 | ||
| 143 | /** | |
| 144 |      * {@inheritdoc} | |
| @@ 176-194 (lines=19) @@ | ||
| 173 | * @psalm-param TKey|null $key | |
| 174 | * @psalm-return static<TKey,T> | |
| 175 | */ | |
| 176 | public function prepend($value, $key = null): Arrayy | |
| 177 |     { | |
| 178 | if ( | |
| 179 | $value instanceof self | |
| 180 | && | |
| 181 | !$value instanceof TypeInterface | |
| 182 |         ) { | |
| 183 |             foreach ($value as $valueTmp) { | |
| 184 | parent::prepend($valueTmp, $key); | |
| 185 | } | |
| 186 | ||
| 187 | return $this; | |
| 188 | } | |
| 189 | ||
| 190 | $return = parent::prepend($value, $key); | |
| 191 | $this->array = $return->array; | |
| 192 | ||
| 193 | return $this; | |
| 194 | } | |
| 195 | ||
| 196 | /** | |
| 197 |      * {@inheritdoc} | |