Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | protected function getVar(string $name, string $default = '', string $nodeName = 'variable'): string |
||
10 | { |
||
11 | $children = Dom::getElements($this->node->childNodes, $nodeName); |
||
12 | |||
13 | foreach ($children as $child) { |
||
14 | if ($name === $this->readAttrText('name', '', $child)) { |
||
|
|||
15 | return $this->readAttrText('value', $default, $child); |
||
16 | } |
||
17 | } |
||
18 | |||
19 | return $default; |
||
20 | } |
||
37 |