Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
85.71% |
6 / 7 |
|
80.00% |
4 / 5 |
CRAP | |
0.00% |
0 / 1 |
Less_Tree_Assignment | |
85.71% |
6 / 7 |
|
80.00% |
4 / 5 |
5.07 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
accept | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
compile | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
genCSS | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
toCss | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * @private |
4 | */ |
5 | class Less_Tree_Assignment extends Less_Tree implements Less_Tree_HasValueProperty { |
6 | |
7 | public $key; |
8 | public $value; |
9 | |
10 | public function __construct( $key, $val ) { |
11 | $this->key = $key; |
12 | $this->value = $val; |
13 | } |
14 | |
15 | public function accept( $visitor ) { |
16 | $this->value = $visitor->visitObj( $this->value ); |
17 | } |
18 | |
19 | public function compile( $env ) { |
20 | return new self( $this->key, $this->value->compile( $env ) ); |
21 | } |
22 | |
23 | /** |
24 | * @see Less_Tree::genCSS |
25 | */ |
26 | public function genCSS( $output ) { |
27 | $output->add( $this->key . '=' ); |
28 | $this->value->genCSS( $output ); |
29 | } |
30 | |
31 | public function toCss() { |
32 | return $this->key . '=' . $this->value->toCSS(); |
33 | } |
34 | } |