Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait EndPointResponseListenerTrait |
||
11 | { |
||
12 | /** |
||
13 | * @var list<callable(T):void> |
||
|
|||
14 | * @readonly |
||
15 | */ |
||
16 | private $responseListeners = []; |
||
17 | |||
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | * |
||
22 | * @param callable(T):void $listener |
||
23 | * |
||
24 | * @return static |
||
25 | * @psalm-mutation-free |
||
26 | */ |
||
27 | 11 | public function onResponse(callable $listener): CallableEndPointInterface |
|
28 | { |
||
29 | 11 | $endpoint = clone $this; |
|
30 | 11 | $endpoint->responseListeners[] = $listener; |
|
31 | |||
32 | 11 | return $endpoint; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * Call all response listeners |
||
37 | * |
||
38 | * @param T $response |
||
39 | */ |
||
40 | 47 | protected function callResponseListeners($response): void |
|
45 | } |
||
46 | 46 | } |
|
48 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths