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