| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class Line extends Collection |
||
| 9 | { |
||
| 10 | public function __construct(int ...$values) |
||
| 11 | { |
||
| 12 | parent::__construct(T::int(), $values); |
||
| 13 | } |
||
| 14 | |||
| 15 | public static function make(int $indentationCount, int $characterCount): self |
||
| 24 | } |
||
| 25 | |||
| 26 | public function merge(self $line): self |
||
| 27 | { |
||
| 28 | $mergedLine = clone $this; |
||
| 29 | |||
| 30 | foreach ($line as $position => $value) { |
||
| 31 | $mergedLine[$position] = ($this[$position] ?? 0) + $value; |
||
| 32 | } |
||
| 33 | |||
| 34 | return $mergedLine; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getMaximumCharacterPositionDensity(): int |
||
| 42 | } |
||
| 43 | |||
| 44 | public function offsetGet($offset): int |
||
| 49 |