| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | public function merge(MergeableInterface $object) |
||
| 8 | { |
||
| 9 | if (!$object instanceof MergeableClassMetadata) { |
||
| 10 | throw new \InvalidArgumentException('$object must be an instance of MergeableClassMetadata.'); |
||
| 11 | } |
||
| 12 | |||
| 13 | $this->name = $object->name; |
||
| 14 | $this->reflection = $object->reflection; |
||
| 15 | $this->methodMetadata = array_merge($this->methodMetadata, $object->methodMetadata); |
||
| 16 | $this->propertyMetadata = array_merge($this->propertyMetadata, $object->propertyMetadata); |
||
| 17 | $this->fileResources = array_merge($this->fileResources, $object->fileResources); |
||
| 18 | |||
| 19 | if ($object->createdAt < $this->createdAt) { |
||
| 20 | $this->createdAt = $object->createdAt; |
||
| 21 | } |
||
| 22 | } |
||
| 23 | } |