| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function cmp(Cache $a, Cache $b) |
||
| 30 | { |
||
| 31 | // current in analyse mode |
||
| 32 | if ($a->getIsInAnalyseMode() !== $b->getIsInAnalyseMode()) { |
||
| 33 | return $a->getIsInAnalyseMode() ? -1 : 1; |
||
| 34 | } |
||
| 35 | |||
| 36 | // check if the item has Dynamic information |
||
| 37 | if ((bool)$a->getDynamicKpi() !== (bool)$b->getDynamicKpi()) { |
||
| 38 | return (bool)$a->getDynamicKpi() ? -1 : 1; |
||
| 39 | } |
||
| 40 | |||
| 41 | return MathUtility::forceIntegerInRange(strcmp($a->getName(), $b->getName()), -1, 1, 0); |
||
| 42 | } |
||
| 43 | |||
| 60 |