Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
19 | class MiddlewareQueue implements IteratorAggregate |
||
20 | { |
||
21 | public const DEFAULT_PRIORITY = 100; |
||
22 | |||
23 | /** @var int counter for FIFO order for items with same priority */ |
||
24 | protected $serial = PHP_INT_MAX; |
||
25 | |||
26 | /** @var SplPriorityQueue middleware */ |
||
27 | protected $queue; |
||
28 | |||
29 | 5 | public function __construct() |
|
32 | 5 | } |
|
33 | |||
34 | /** |
||
35 | * Adds middleware to queue |
||
36 | * |
||
37 | * @param MiddlewareInterface $middleware |
||
38 | * @param int $priority |
||
39 | * @return \self |
||
|
|||
40 | */ |
||
41 | 5 | public function add(MiddlewareInterface $middleware, int $priority = self::DEFAULT_PRIORITY): self |
|
42 | { |
||
43 | 5 | $this->queue->insert($middleware, [$priority, $this->serial--]); |
|
44 | 5 | return $this; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Implements IteratorAggregate |
||
49 | * |
||
50 | * @return Traversable |
||
51 | */ |
||
52 | 5 | public function getIterator(): Traversable |
|
55 | } |
||
56 | } |
||
57 |
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