| Conditions | 7 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | private static function orderedFixtureSorter(): \Closure |
||
| 14 | { |
||
| 15 | 3 | return static function ($a, $b): int { |
|
| 16 | 3 | if ($a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { |
|
| 17 | 3 | return $a->getOrder() - $b->getOrder(); |
|
| 18 | } |
||
| 19 | |||
| 20 | 3 | if ($a instanceof OrderedFixtureInterface && ! $b instanceof OrderedFixtureInterface) { |
|
| 21 | 3 | return 1; |
|
| 22 | } |
||
| 23 | |||
| 24 | 3 | if (! $a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { |
|
| 25 | 3 | return -1; |
|
| 26 | } |
||
| 27 | |||
| 28 | 3 | return 0; |
|
| 29 | 3 | }; |
|
| 30 | } |
||
| 31 | } |
||
| 32 |