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