Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 12 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
28 | View Code Duplication | private function setupResultObject() |
|
29 | { |
||
30 | $result = $this->detector->getResultObject()->getDevice(); |
||
31 | $browserData = $this->detectByType(); |
||
32 | foreach ($browserData as $key => $value) { |
||
33 | if ($key === 'originalInfo') { |
||
34 | $this->setAttributes($value); |
||
35 | continue; |
||
36 | } |
||
37 | Tools::runSetter($result, $key, $value); |
||
38 | } |
||
39 | } |
||
40 | } |
Overwriting private methods is generally fine as long as you also use private visibility. It might still be preferable for understandability to use a different method name.