Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
ComponentValue | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getPosition | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
toComponentValueArray | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | /** |
3 | * @file |
4 | * @license https://opensource.org/licenses/Apache-2.0 Apache-2.0 |
5 | */ |
6 | |
7 | namespace Wikimedia\CSS\Objects; |
8 | |
9 | /** |
10 | * Represent a CSS component value |
11 | */ |
12 | abstract class ComponentValue implements CSSObject { |
13 | |
14 | /** @var int Line in the input where this component value starts */ |
15 | protected $line = -1; |
16 | |
17 | /** @var int Position in the input where this component value starts */ |
18 | protected $pos = -1; |
19 | |
20 | /** |
21 | * Get the position of this ComponentValue in the input stream |
22 | * @return array [ $line, $pos ] |
23 | */ |
24 | public function getPosition() { |
25 | return [ $this->line, $this->pos ]; |
26 | } |
27 | |
28 | /** @inheritDoc */ |
29 | public function toComponentValueArray() { |
30 | return [ $this ]; |
31 | } |
32 | } |