Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
56 | 4 | public function addRelationship(Relationship $relationship) |
|
57 | { |
||
58 | 4 | $name = $relationship->getName(); |
|
59 | |||
60 | 4 | if (isset($this->relationships[$name])) { |
|
61 | 1 | throw new \LogicException(sprintf('Relationship "%s" already defined.', $name)); |
|
62 | } |
||
63 | |||
64 | 4 | $this->relationships[$name] = $relationship; |
|
65 | 4 | } |
|
66 | |||
76 | } |