Innmind /
Immutable
| 1 | <?php |
||
| 2 | declare(strict_types = 1); |
||
| 3 | |||
| 4 | namespace Innmind\Immutable\Either; |
||
| 5 | |||
| 6 | use Innmind\Immutable\{ |
||
| 7 | Either, |
||
| 8 | Maybe, |
||
| 9 | }; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @template L1 |
||
| 13 | * @template R1 |
||
| 14 | * @implements Implementation<L1, R1> |
||
| 15 | * @psalm-immutable |
||
| 16 | * @internal |
||
| 17 | */ |
||
| 18 | final class Left implements Implementation |
||
| 19 | { |
||
| 20 | /** @var L1 */ |
||
|
0 ignored issues
–
show
|
|||
| 21 | private $value; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param L1 $value |
||
| 25 | */ |
||
| 26 | public function __construct($value) |
||
| 27 | { |
||
| 28 | $this->value = $value; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @template T |
||
| 33 | * |
||
| 34 | * @param callable(R1): T $map |
||
| 35 | * |
||
| 36 | * @return self<L1, T> |
||
| 37 | */ |
||
| 38 | public function map(callable $map): self |
||
| 39 | { |
||
| 40 | /** @var self<L1, T> */ |
||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function flatMap(callable $map): Either |
||
| 45 | { |
||
| 46 | return Either::left($this->value); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function leftMap(callable $map): self |
||
| 50 | { |
||
| 51 | return new self($map($this->value)); |
||
| 52 | } |
||
| 53 | |||
| 54 | public function match(callable $right, callable $left) |
||
| 55 | { |
||
| 56 | return $left($this->value); |
||
| 57 | } |
||
| 58 | |||
| 59 | public function otherwise(callable $otherwise): Either |
||
| 60 | { |
||
| 61 | return $otherwise($this->value); |
||
| 62 | } |
||
| 63 | |||
| 64 | public function filter(callable $predicate, callable $otherwise): self |
||
| 65 | { |
||
| 66 | return $this; |
||
| 67 | } |
||
| 68 | |||
| 69 | public function maybe(): Maybe |
||
| 70 | { |
||
| 71 | return Maybe::nothing(); |
||
| 72 | } |
||
| 73 | } |
||
| 74 |
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