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