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 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ObjectMetadata extends ClassMetadata |
||
16 | { |
||
17 | 1 | public function __construct(ValidationNode $object) |
|
18 | { |
||
19 | 1 | parent::__construct($object->getName()); |
|
20 | 1 | } |
|
21 | |||
22 | 1 | public function addPropertyConstraint($property, Constraint $constraint) |
|
23 | { |
||
24 | 1 | if (!isset($this->properties[$property])) { |
|
25 | 1 | $this->properties[$property] = new PropertyMetadata($property); |
|
26 | |||
27 | 1 | $this->addPropertyMetadata($this->properties[$property]); |
|
28 | } |
||
29 | |||
30 | 1 | $constraint->addImplicitGroupName($this->getDefaultGroup()); |
|
31 | |||
32 | 1 | $this->properties[$property]->addConstraint($constraint); |
|
33 | |||
34 | 1 | return $this; |
|
35 | } |
||
36 | |||
37 | 1 | private function addPropertyMetadata(PropertyMetadataInterface $metadata) |
|
42 | 1 | } |
|
43 | } |
||
44 |