| @@ 137-145 (lines=9) @@ | ||
| 134 | /** |
|
| 135 | * {@inheritdoc} |
|
| 136 | */ |
|
| 137 | public function pad(int $size, $value): CollectionInterface |
|
| 138 | { |
|
| 139 | $this->validate($this->type, [$value]); |
|
| 140 | ||
| 141 | return new self( |
|
| 142 | $this->type, |
|
| 143 | parent::pad($size, $value)->toPrimitive() |
|
| 144 | ); |
|
| 145 | } |
|
| 146 | ||
| 147 | /** |
|
| 148 | * {@inheritdoc} |
|
| @@ 174-182 (lines=9) @@ | ||
| 171 | /** |
|
| 172 | * {@inheritdoc} |
|
| 173 | */ |
|
| 174 | public function push($value): CollectionInterface |
|
| 175 | { |
|
| 176 | $this->validate($this->type, [$value]); |
|
| 177 | ||
| 178 | return new self( |
|
| 179 | $this->type, |
|
| 180 | parent::push($value)->toPrimitive() |
|
| 181 | ); |
|
| 182 | } |
|
| 183 | ||
| 184 | /** |
|
| 185 | * {@inheritdoc} |
|
| @@ 292-300 (lines=9) @@ | ||
| 289 | /** |
|
| 290 | * {@inheritdoc} |
|
| 291 | */ |
|
| 292 | public function unshift($value): CollectionInterface |
|
| 293 | { |
|
| 294 | $this->validate($this->type, [$value]); |
|
| 295 | ||
| 296 | return new self( |
|
| 297 | $this->type, |
|
| 298 | parent::unshift($value)->toPrimitive() |
|
| 299 | ); |
|
| 300 | } |
|
| 301 | ||
| 302 | /** |
|
| 303 | * {@inheritdoc} |
|
| @@ 513-521 (lines=9) @@ | ||
| 510 | /** |
|
| 511 | * {@inheritdoc} |
|
| 512 | */ |
|
| 513 | public function set($key, $value): CollectionInterface |
|
| 514 | { |
|
| 515 | $this->validate($this->type, [$value]); |
|
| 516 | ||
| 517 | return new self( |
|
| 518 | $this->type, |
|
| 519 | parent::set($key, $value)->toPrimitive() |
|
| 520 | ); |
|
| 521 | } |
|
| 522 | ||
| 523 | /** |
|
| 524 | * {@inheritdoc} |
|