Total Complexity | 9 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | final class Right implements Implementation |
||
19 | { |
||
20 | /** @var R1 */ |
||
|
|||
21 | private $value; |
||
22 | |||
23 | /** |
||
24 | * @param R1 $value |
||
25 | */ |
||
26 | public function __construct($value) |
||
27 | { |
||
28 | $this->value = $value; |
||
29 | } |
||
30 | |||
31 | public function map(callable $map): self |
||
32 | { |
||
33 | return new self($map($this->value)); |
||
34 | } |
||
35 | |||
36 | public function flatMap(callable $map): Either |
||
37 | { |
||
38 | return $map($this->value); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @template T |
||
43 | * |
||
44 | * @param callable(L1): T $map |
||
45 | * |
||
46 | * @return self<T, R1> |
||
47 | */ |
||
48 | public function leftMap(callable $map): self |
||
49 | { |
||
50 | /** @var self<T, R1> */ |
||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | public function match(callable $right, callable $left) |
||
55 | { |
||
56 | return $right($this->value); |
||
57 | } |
||
58 | |||
59 | public function otherwise(callable $otherwise): Either |
||
60 | { |
||
61 | return Either::right($this->value); |
||
62 | } |
||
63 | |||
64 | public function filter(callable $predicate, callable $otherwise): Implementation |
||
71 | } |
||
72 | |||
73 | public function maybe(): Maybe |
||
74 | { |
||
75 | return Maybe::just($this->value); |
||
76 | } |
||
77 | } |
||
78 |
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