1 | <?php |
||
2 | |||
3 | namespace Vox\Webservice; |
||
4 | |||
5 | use Metadata\MetadataFactoryInterface; |
||
6 | use Vox\Webservice\Metadata\TransferMetadata; |
||
7 | |||
8 | /** |
||
9 | * some metadata utilities |
||
10 | * |
||
11 | * @author Jhonatan Teixeira <[email protected]> |
||
12 | */ |
||
13 | trait MetadataTrait |
||
14 | { |
||
15 | /** |
||
16 | * @var MetadataFactoryInterface |
||
17 | */ |
||
18 | private $metadataFactory; |
||
19 | |||
20 | 20 | private function getIdValue($object) |
|
21 | { |
||
22 | 20 | return $this->getClassMetadata($object)->id->getValue($object); |
|
23 | } |
||
24 | |||
25 | 20 | private function getClassMetadata($object): TransferMetadata |
|
26 | { |
||
27 | 20 | if ($object instanceof AccessInterceptorValueHolderInterface) { |
|
0 ignored issues
–
show
|
|||
28 | $object = $object->getWrappedValueHolderValue(); |
||
29 | } |
||
30 | |||
31 | 20 | if (is_object($object)) { |
|
32 | 20 | $object = get_class($object); |
|
33 | } |
||
34 | |||
35 | 20 | return $this->metadataFactory->getMetadataForClass($object); |
|
0 ignored issues
–
show
|
|||
36 | } |
||
37 | } |
||
38 |
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