Innmind /
Immutable
| 1 | <?php |
||
| 2 | declare(strict_types = 1); |
||
| 3 | |||
| 4 | namespace Innmind\Immutable\Maybe; |
||
| 5 | |||
| 6 | use Innmind\Immutable\Maybe; |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @template V |
||
| 10 | * @implements Implementation<V> |
||
| 11 | * @psalm-immutable |
||
| 12 | * @internal |
||
| 13 | */ |
||
| 14 | final class Just implements Implementation |
||
| 15 | { |
||
| 16 | /** @var V */ |
||
|
0 ignored issues
–
show
|
|||
| 17 | private $value; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param V $value |
||
| 21 | */ |
||
| 22 | public function __construct($value) |
||
| 23 | { |
||
| 24 | $this->value = $value; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function map(callable $map): self |
||
| 28 | { |
||
| 29 | return new self($map($this->value)); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function flatMap(callable $map): Maybe |
||
| 33 | { |
||
| 34 | return $map($this->value); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function match(callable $just, callable $nothing) |
||
| 38 | { |
||
| 39 | return $just($this->value); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function otherwise(callable $otherwise): Maybe |
||
| 43 | { |
||
| 44 | return Maybe::just($this->value); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function filter(callable $predicate): Implementation |
||
| 48 | { |
||
| 49 | if ($predicate($this->value) === true) { |
||
| 50 | return $this; |
||
| 51 | } |
||
| 52 | |||
| 53 | return new Nothing; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
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