Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
75.00% |
3 / 4 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| Less_Tree_Keyword | |
75.00% |
3 / 4 |
|
50.00% |
1 / 2 |
3.14 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| genCSS | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
2.15 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @private |
| 4 | */ |
| 5 | class Less_Tree_Keyword extends Less_Tree implements Less_Tree_HasValueProperty { |
| 6 | |
| 7 | /** @var string */ |
| 8 | public $value; |
| 9 | |
| 10 | /** |
| 11 | * @param string $value |
| 12 | */ |
| 13 | public function __construct( $value ) { |
| 14 | $this->value = $value; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * @see Less_Tree::genCSS |
| 19 | */ |
| 20 | public function genCSS( $output ) { |
| 21 | if ( $this->value === '%' ) { |
| 22 | throw new Less_Exception_Compiler( "Invalid % without number" ); |
| 23 | } |
| 24 | |
| 25 | $output->add( $this->value ); |
| 26 | } |
| 27 | } |