Conditions | 5 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function wrap($relations, $object, $siblings = []) { |
||
22 | //see if any relations need overwriting |
||
23 | foreach ($relations as $name => $relation) { |
||
24 | if (isset($object->$name) && !($object->$name instanceof \Maphper\Relation) ) { |
||
25 | //After overwriting the relation, does the parent object ($object) need overwriting as well? |
||
26 | if ($relation->overwrite($object, $object->$name)) $this->parent[] = $object; |
||
27 | } |
||
28 | |||
29 | $object->$name = $relation->getData($object, $siblings); |
||
30 | } |
||
31 | return $object; |
||
32 | } |
||
33 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.