Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public static function compare(self $x, self $y): int |
||
49 | { |
||
50 | if ($x->length !== $y->length) { |
||
51 | return $x->length - $y->length; |
||
52 | } |
||
53 | |||
54 | foreach ($x->classes as $key => $value) { |
||
55 | if ($value !== $y->classes[$key]) { |
||
56 | return $value - $y->classes[$key]; |
||
57 | } |
||
58 | } |
||
59 | |||
60 | return 0; |
||
61 | } |
||
62 | } |
||
63 |