| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | trait Padding |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @see Paddable::padRight() |
||
| 24 | * @param int $amount |
||
| 25 | * @param mixed $value |
||
| 26 | * @return static |
||
| 27 | */ |
||
| 28 | public function padRight(int $amount, $value) |
||
| 29 | { |
||
| 30 | return $this->newCopy(array_pad($this->items(), $amount, $value)); |
||
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @see Paddable::padLeft() |
||
| 35 | * @param int $amount |
||
| 36 | * @param mixed $value |
||
| 37 | * @return static |
||
| 38 | */ |
||
| 39 | public function padLeft(int $amount, $value) |
||
| 42 | } |
||
| 43 | |||
| 44 | /** @see Collection::items() */ |
||
| 45 | abstract public function items(): array; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @see ImmutableCollection::newCopy() |
||
| 49 | * @param array $items |
||
| 50 | * @return Collection|static |
||
| 51 | */ |
||
| 52 | abstract protected function newCopy(array $items): Collection; |
||
| 53 | } |
||
| 54 |