Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 2 | public function checkPreconditions( |
|
31 | array $wrappers, |
||
32 | FlightRouteInterface $flightRoute, |
||
33 | bool $isFixedFleetMode |
||
34 | ): ConditionCheckResult { |
||
35 | 2 | $conditionCheckResult = new ConditionCheckResult($this->leaveFleet, $isFixedFleetMode); |
|
36 | |||
37 | 2 | array_walk( |
|
38 | 2 | $this->conditions, |
|
39 | 2 | fn (PreFlightConditionInterface $condition) => array_walk( |
|
40 | 2 | $wrappers, |
|
41 | 2 | fn (ShipWrapperInterface $wrapper) => $condition->check( |
|
42 | 2 | $wrapper, |
|
43 | 2 | $flightRoute, |
|
44 | 2 | $conditionCheckResult |
|
45 | 2 | ) |
|
46 | 2 | ) |
|
47 | 2 | ); |
|
48 | |||
49 | 2 | return $conditionCheckResult; |
|
50 | } |
||
52 |