Conditions | 9 |
Paths | 35 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 9 |
Changes | 0 |
1 | <?php |
||
20 | 3 | public function compare($a, $b) { |
|
21 | 3 | if ($a->isStatic() !== $isStatic = $b->isStatic()) { |
|
22 | 2 | return $isStatic ? 1 : -1; |
|
23 | } |
||
24 | |||
25 | 3 | if (($aV = $a->getVisibility()) !== $bV = $b->getVisibility()) { |
|
26 | 2 | $aV = 'public' === $aV ? 3 : ('protected' === $aV ? 2 : 1); |
|
27 | 2 | $bV = 'public' === $bV ? 3 : ('protected' === $bV ? 2 : 1); |
|
28 | |||
29 | 2 | return $aV > $bV ? -1 : 1; |
|
30 | } |
||
31 | |||
32 | 2 | return strcasecmp($a->getName(), $b->getName()); |
|
33 | } |
||
34 | |||
36 |