| Total Complexity | 5 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | final class Comprehension |
||
| 12 | { |
||
| 13 | private Maybe $first; |
||
| 14 | /** @var list<Maybe> */ |
||
|
|
|||
| 15 | private array $rest; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @no-named-arguments |
||
| 19 | */ |
||
| 20 | private function __construct(Maybe $first, Maybe ...$rest) |
||
| 21 | { |
||
| 22 | $this->first = $first; |
||
| 23 | $this->rest = $rest; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @internal |
||
| 28 | * @psalm-pure |
||
| 29 | * @no-named-arguments |
||
| 30 | */ |
||
| 31 | public static function of(Maybe $first, Maybe ...$rest): self |
||
| 32 | { |
||
| 33 | return new self($first, ...$rest); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @template T |
||
| 38 | * |
||
| 39 | * @param callable(...mixed): T $map |
||
| 40 | * |
||
| 41 | * @return Maybe<T> |
||
| 42 | */ |
||
| 43 | public function map(callable $map): Maybe |
||
| 44 | { |
||
| 45 | return $this->collapse()->map(static fn(array $args) => $map(...$args)); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @template T |
||
| 50 | * |
||
| 51 | * @param callable(...mixed): Maybe<T> $map |
||
| 52 | * |
||
| 53 | * @return Maybe<T> |
||
| 54 | */ |
||
| 55 | public function flatMap(callable $map): Maybe |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return Maybe<list<mixed>> |
||
| 62 | */ |
||
| 63 | private function collapse(): Maybe |
||
| 77 | ); |
||
| 78 | } |
||
| 79 | } |
||
| 80 |
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