1 | <?php |
||||
2 | |||||
3 | namespace Isswp101\Persimmon\DTO; |
||||
4 | |||||
5 | final class Id |
||||
6 | { |
||||
7 | private int|string|null $value; |
||||
0 ignored issues
–
show
|
|||||
8 | |||||
9 | public function __construct(int|string|null $value) |
||||
10 | { |
||||
11 | $this->value = $value; |
||||
12 | } |
||||
13 | |||||
14 | public function value(): int|string|null |
||||
15 | { |
||||
16 | return $this->value; |
||||
17 | } |
||||
18 | |||||
19 | public function isPresent(): bool |
||||
20 | { |
||||
21 | return $this->value != null; |
||||
0 ignored issues
–
show
|
|||||
22 | } |
||||
23 | |||||
24 | public static function undefined(): Id |
||||
25 | { |
||||
26 | return new Id(null); |
||||
0 ignored issues
–
show
null of type null is incompatible with the type Isswp101\Persimmon\DTO\null|integer|string expected by parameter $value of Isswp101\Persimmon\DTO\Id::__construct() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
27 | } |
||||
28 | } |
||||
29 |
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