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