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 |
||
| 12 | class ObjectMetadata extends ClassMetadata |
||
| 13 | { |
||
| 14 | 11 | public function __construct(ValidationNode $object) |
|
| 15 | { |
||
| 16 | 11 | parent::__construct($object->getName()); |
|
| 17 | 11 | } |
|
| 18 | |||
| 19 | 10 | public function addPropertyConstraint($property, Constraint $constraint): self |
|
| 20 | { |
||
| 21 | 10 | if (!isset($this->properties[$property])) { |
|
| 22 | 10 | $this->properties[$property] = new PropertyMetadata($property); |
|
| 23 | |||
| 24 | 10 | $this->addPropertyMetadata($this->properties[$property]); |
|
| 25 | } |
||
| 26 | |||
| 27 | 10 | $constraint->addImplicitGroupName($this->getDefaultGroup()); |
|
| 28 | |||
| 29 | 10 | $this->properties[$property]->addConstraint($constraint); |
|
| 30 | |||
| 31 | 10 | return $this; |
|
| 32 | } |
||
| 33 | |||
| 34 | 10 | private function addPropertyMetadata(PropertyMetadataInterface $metadata): void |
|
| 39 | 10 | } |
|
| 40 | } |
||
| 41 |