We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 6 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class MetadataFactory implements MetadataFactoryInterface |
||
15 | { |
||
16 | private $metadataPool; |
||
17 | |||
18 | public function __construct() |
||
19 | { |
||
20 | $this->metadataPool = []; |
||
21 | } |
||
22 | |||
23 | public function getMetadataFor($object) |
||
24 | { |
||
25 | if ($object instanceof ValidationNode) { |
||
26 | return $this->metadataPool[$object->getName()]; |
||
27 | } |
||
28 | |||
29 | throw new NoSuchMetadataException(); |
||
30 | } |
||
31 | |||
32 | public function hasMetadataFor($object) |
||
39 | } |
||
40 | |||
41 | public function addMetadata(ObjectMetadata $metadata): void |
||
44 | } |
||
45 | } |
||
46 |