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