We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class ObjectMetadata extends ClassMetadata |
||
13 | { |
||
14 | public function __construct(ValidationNode $object) |
||
15 | { |
||
16 | parent::__construct($object->getName()); |
||
17 | } |
||
18 | |||
19 | public function addPropertyConstraint($property, Constraint $constraint) |
||
20 | { |
||
21 | if (!isset($this->properties[$property])) { |
||
22 | $this->properties[$property] = new PropertyMetadata($property); |
||
23 | |||
24 | $this->addPropertyMetadata($this->properties[$property]); |
||
25 | } |
||
26 | |||
27 | $constraint->addImplicitGroupName($this->getDefaultGroup()); |
||
28 | |||
29 | $this->properties[$property]->addConstraint($constraint); |
||
30 | |||
31 | return $this; |
||
32 | } |
||
33 | |||
34 | private function addPropertyMetadata(PropertyMetadataInterface $metadata): void |
||
39 | } |
||
40 | } |
||
41 |