Conditions | 4 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
31 | 1 | public function failureDescription($other) |
|
32 | { |
||
33 | 1 | if ($other->is_root()) { |
|
34 | 1 | $node_string = 'HTML page'; |
|
35 | } else { |
||
36 | 1 | $node_string = $other->tag_name(); |
|
37 | |||
38 | 1 | if ($id = $other->attribute('id')) { |
|
39 | 1 | $node_string .= '#'.$id; |
|
40 | } |
||
41 | |||
42 | 1 | if ($class = $other->attribute('class')) { |
|
43 | 1 | $node_string .= '.'.implode('.', explode(' ', $class)); |
|
44 | } |
||
45 | } |
||
46 | |||
47 | 1 | return "$node_string ".$this->toString(); |
|
48 | } |
||
49 | |||
60 |