| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Lines | 9 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | View Code Duplication | private function initResultObject() |
|
| 19 | { |
||
| 20 | $result = $this->detector->getResultObject()->getDevice(); |
||
| 21 | |||
| 22 | // init default value from data |
||
| 23 | foreach ($this->config['default'] as $defaultKey => $defaultValue) { |
||
| 24 | Tools::runSetter($result, $defaultKey, $defaultValue); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 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.