Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | 2 | public function __construct( EntityId $entityId, EntityId $targetId ) { |
|
34 | 2 | if ( $entityId->getEntityType() !== $targetId->getEntityType() ) { |
|
35 | 1 | throw new InvalidArgumentException( |
|
36 | '$entityId and $targetId must refer to the same kind of entity.' |
||
37 | 1 | ); |
|
38 | } |
||
39 | |||
40 | 1 | $this->entityId = $entityId; |
|
41 | 1 | $this->targetId = $targetId; |
|
42 | 1 | } |
|
43 | |||
84 |