Total Complexity | 7 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
18 | final class History implements Journal, IteratorAggregate |
||
19 | { |
||
20 | /** @var Tuple[] */ |
||
21 | private $tuples = []; |
||
22 | |||
23 | /** {@inheritDoc} */ |
||
24 | public function addSuccess(RequestInterface $request, ResponseInterface $response) |
||
27 | } |
||
28 | |||
29 | /** {@inheritDoc} */ |
||
30 | public function addFailure(RequestInterface $request, Exception $exception) |
||
31 | { |
||
32 | $response = $exception instanceof HttpException |
||
33 | ? $exception->getResponse() |
||
34 | : null; |
||
35 | |||
36 | $this->tuples[] = new Tuple($request, $response); |
||
37 | } |
||
38 | |||
39 | public function getLastResponse(): ?ResponseInterface |
||
40 | { |
||
41 | if (1 > count($this->tuples)) { |
||
42 | return null; |
||
43 | } |
||
44 | |||
45 | /** @var Tuple $tuple */ |
||
46 | $tuple = end($this->tuples); |
||
47 | reset($this->tuples); |
||
48 | |||
49 | return $tuple->getResponse(); |
||
50 | } |
||
51 | |||
52 | /** @return iterable<Tuple> */ |
||
53 | public function getIterator(): iterable |
||
58 | } |
||
59 | |||
60 | public function reset(): void |
||
63 | } |
||
64 | } |
||
65 |
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