Total Complexity | 5 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | final class Identity implements Property |
||
16 | { |
||
17 | /** @var T */ |
||
|
|||
18 | private mixed $value; |
||
19 | /** @var callable(T, T): bool */ |
||
20 | private $equals; |
||
21 | |||
22 | /** |
||
23 | * @param T $value |
||
24 | * @param callable(T, T): bool $equals |
||
25 | */ |
||
26 | public function __construct(mixed $value, callable $equals) |
||
27 | { |
||
28 | $this->value = $value; |
||
29 | $this->equals = $equals; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @template A |
||
34 | * |
||
35 | * @param Set<A> $values |
||
36 | * @param callable(A, A): bool $equals |
||
37 | * |
||
38 | * @return Set<self<A>> |
||
39 | */ |
||
40 | public static function any(Set $values, callable $equals): Set |
||
41 | { |
||
42 | return Set\Decorate::immutable( |
||
43 | static fn($value) => new self($value, $equals), |
||
44 | $values, |
||
45 | ); |
||
46 | } |
||
47 | |||
48 | public function name(): string |
||
49 | { |
||
50 | return 'Identity value has no effect on the combined value'; |
||
51 | } |
||
52 | |||
53 | public function applicableTo(object $monoid): bool |
||
56 | } |
||
57 | |||
58 | public function ensureHeldBy(object $monoid): object |
||
59 | { |
||
81 |
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