Total Complexity | 10 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
9 | trait SpacingContextTrait |
||
10 | { |
||
11 | use ArgumentsTrait; |
||
12 | |||
13 | /** |
||
14 | * List of spacers. |
||
15 | * - Parser for a normal spacer. |
||
16 | * - `null` to disable spacing. |
||
17 | * - `true` to use the top-most spacer. |
||
18 | * |
||
19 | * @var Parser[]|null[]|bool[] |
||
20 | */ |
||
21 | private $spacers = []; |
||
22 | |||
23 | 513 | public function pushSpacer($skipper = null) |
|
24 | { |
||
25 | 513 | $this->spacers[] = ($skipper === null || $skipper === true) |
|
26 | 513 | ? $skipper |
|
27 | 29 | : $this->getArgument($skipper); |
|
28 | 513 | } |
|
29 | |||
30 | 29 | public function popSpacer() |
|
33 | 29 | } |
|
34 | |||
35 | 176 | public function skipSpacing($in, $offset) |
|
55 | } |
||
56 | } |
||
57 |