Total Complexity | 13 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
9 | class MixedTypehint extends Compound |
||
10 | { |
||
11 | private $fieldName; |
||
12 | |||
13 | public function __construct(string $fieldName) |
||
14 | { |
||
15 | $this->fieldName = $fieldName; |
||
16 | parent::__construct( |
||
17 | $fieldName, |
||
18 | new Boolean($fieldName), |
||
19 | new FloatingPoint($fieldName), |
||
20 | new Integer($fieldName), |
||
21 | new StringLiteral($fieldName), |
||
22 | new PrimitiveArray($fieldName), |
||
23 | new NullObject() |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | public function fromMissingValue() |
||
28 | { |
||
29 | throw new MissingValueException($this->fieldName); |
||
30 | } |
||
31 | |||
32 | public function supports($input): bool |
||
33 | { |
||
34 | return ($input instanceof ValueObjectInterface) || parent::supports($input); |
||
35 | } |
||
36 | |||
37 | public function supportsFromNative($input): bool |
||
40 | } |
||
41 | |||
42 | public function supportsToNative($input): bool |
||
45 | } |
||
46 | |||
47 | public function fromNative($input) |
||
48 | { |
||
49 | if ($input instanceof ValueObjectInterface) { |
||
50 | return $input; |
||
51 | } |
||
52 | return parent::fromNative($input); |
||
53 | } |
||
54 | |||
55 | public function toNative($input) |
||
61 | } |
||
62 | |||
63 | public function __toString() |
||
66 | } |
||
67 | } |
||
68 |
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