| @@ 140-148 (lines=9) @@ | ||
| 137 | /** |
|
| 138 | * {@inheritdoc} |
|
| 139 | */ |
|
| 140 | public function pad(int $size, $value): CollectionInterface |
|
| 141 | { |
|
| 142 | $this->validate($this->type, [$value]); |
|
| 143 | ||
| 144 | return new self( |
|
| 145 | $this->type, |
|
| 146 | parent::pad($size, $value)->toPrimitive() |
|
| 147 | ); |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * {@inheritdoc} |
|
| @@ 177-185 (lines=9) @@ | ||
| 174 | /** |
|
| 175 | * {@inheritdoc} |
|
| 176 | */ |
|
| 177 | public function push($value): CollectionInterface |
|
| 178 | { |
|
| 179 | $this->validate($this->type, [$value]); |
|
| 180 | ||
| 181 | return new self( |
|
| 182 | $this->type, |
|
| 183 | parent::push($value)->toPrimitive() |
|
| 184 | ); |
|
| 185 | } |
|
| 186 | ||
| 187 | /** |
|
| 188 | * {@inheritdoc} |
|
| @@ 295-303 (lines=9) @@ | ||
| 292 | /** |
|
| 293 | * {@inheritdoc} |
|
| 294 | */ |
|
| 295 | public function unshift($value): CollectionInterface |
|
| 296 | { |
|
| 297 | $this->validate($this->type, [$value]); |
|
| 298 | ||
| 299 | return new self( |
|
| 300 | $this->type, |
|
| 301 | parent::unshift($value)->toPrimitive() |
|
| 302 | ); |
|
| 303 | } |
|
| 304 | ||
| 305 | /** |
|
| 306 | * {@inheritdoc} |
|
| @@ 516-524 (lines=9) @@ | ||
| 513 | /** |
|
| 514 | * {@inheritdoc} |
|
| 515 | */ |
|
| 516 | public function set($key, $value): CollectionInterface |
|
| 517 | { |
|
| 518 | $this->validate($this->type, [$value]); |
|
| 519 | ||
| 520 | return new self( |
|
| 521 | $this->type, |
|
| 522 | parent::set($key, $value)->toPrimitive() |
|
| 523 | ); |
|
| 524 | } |
|
| 525 | ||
| 526 | /** |
|
| 527 | * {@inheritdoc} |
|