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