Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
93 | 2 | public function setParentEntity($entity) { |
|
94 | |||
95 | 2 | if (empty($entity)) { |
|
96 | 1 | $this->parent_guid = 0; |
|
97 | 1 | return true; |
|
98 | } |
||
99 | |||
100 | 2 | if (!$entity instanceof ElggPage || empty($entity->guid)) { |
|
101 | 2 | return false; |
|
102 | } |
||
103 | |||
104 | 2 | $this->parent_guid = $entity->guid; |
|
105 | 2 | return true; |
|
106 | } |
||
108 |