Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public function benchColdParentItemAccess(array $params) |
||
40 | { |
||
41 | $child = $this->xml->xpath('//Item[@id="' . $params['child'] . '"][1]')[0]; |
||
42 | $parentLevel = $child['idLevel'] - 1; |
||
43 | $parent = $child->xpath('preceding-sibling::Item[@idLevel="' . $parentLevel . '"][1]')[0]; |
||
1 ignored issue
–
show
|
|||
44 | |||
45 | $this->assertSame($params['parent'], (string)$parent['id']); |
||
46 | } |
||
47 | |||
76 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.