Passed
Push — dev ( 45bf8d...5b8f46 )
by Janko
10:07
created

AnomalyConsequence   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A skipWhenTractored() 0 4 1
A __construct() 0 1 1
A triggerSpecific() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Spacecraft\Lib\Movement\Component\Consequence\PostFlight;
6
7
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Stu\Component\Anomaly\AnomalyHandlingInterface;
9
use Stu\Module\Spacecraft\Lib\Message\MessageCollectionInterface;
10
use Stu\Module\Spacecraft\Lib\Movement\Component\Consequence\AbstractFlightConsequence;
11
use Stu\Module\Spacecraft\Lib\Movement\Route\FlightRouteInterface;
12
use Stu\Module\Spacecraft\Lib\SpacecraftWrapperInterface;
13
14
class AnomalyConsequence extends AbstractFlightConsequence implements PostFlightConsequenceInterface
15
{
16 2
    public function __construct(private AnomalyHandlingInterface $anomalyHandling) {}
17
18 1
    #[Override]
19
    protected function skipWhenTractored(): bool
20
    {
21 1
        return false;
22
    }
23
24 1
    #[Override]
25
    protected function triggerSpecific(
26
        SpacecraftWrapperInterface $wrapper,
27
        FlightRouteInterface $flightRoute,
28
        MessageCollectionInterface $messages
29
    ): void {
30
31 1
        $this->anomalyHandling->handleIncomingSpacecraft($wrapper, $messages);
32
    }
33
}
34