| @@ 129-137 (lines=9) @@ | ||
| 126 | /** |
|
| 127 | * {@inheritdoc} |
|
| 128 | */ |
|
| 129 | public function pad(int $size, $value): CollectionInterface |
|
| 130 | { |
|
| 131 | $this->validate($this->type, [$value]); |
|
| 132 | ||
| 133 | return new self( |
|
| 134 | $this->type, |
|
| 135 | parent::pad($size, $value)->toPrimitive() |
|
| 136 | ); |
|
| 137 | } |
|
| 138 | ||
| 139 | /** |
|
| 140 | * {@inheritdoc} |
|
| @@ 166-174 (lines=9) @@ | ||
| 163 | /** |
|
| 164 | * {@inheritdoc} |
|
| 165 | */ |
|
| 166 | public function push($value): CollectionInterface |
|
| 167 | { |
|
| 168 | $this->validate($this->type, [$value]); |
|
| 169 | ||
| 170 | return new self( |
|
| 171 | $this->type, |
|
| 172 | parent::push($value)->toPrimitive() |
|
| 173 | ); |
|
| 174 | } |
|
| 175 | ||
| 176 | /** |
|
| 177 | * {@inheritdoc} |
|
| @@ 284-292 (lines=9) @@ | ||
| 281 | /** |
|
| 282 | * {@inheritdoc} |
|
| 283 | */ |
|
| 284 | public function unshift($value): CollectionInterface |
|
| 285 | { |
|
| 286 | $this->validate($this->type, [$value]); |
|
| 287 | ||
| 288 | return new self( |
|
| 289 | $this->type, |
|
| 290 | parent::unshift($value)->toPrimitive() |
|
| 291 | ); |
|
| 292 | } |
|
| 293 | ||
| 294 | /** |
|
| 295 | * {@inheritdoc} |
|
| @@ 505-513 (lines=9) @@ | ||
| 502 | /** |
|
| 503 | * {@inheritdoc} |
|
| 504 | */ |
|
| 505 | public function set($key, $value): CollectionInterface |
|
| 506 | { |
|
| 507 | $this->validate($this->type, [$value]); |
|
| 508 | ||
| 509 | return new self( |
|
| 510 | $this->type, |
|
| 511 | parent::set($key, $value)->toPrimitive() |
|
| 512 | ); |
|
| 513 | } |
|
| 514 | ||
| 515 | /** |
|
| 516 | * {@inheritdoc} |
|