Code Duplication    Length = 9-9 lines in 3 locations

src/Detection/BrowserDetector.php 1 location

@@ 18-26 (lines=9) @@
15
    }
16
17
18
    private function initResultObject()
19
    {
20
        $result = $this->detector->getResultObject()->getBrowser();
21
22
        // init default value from data
23
        foreach ($this->config['default'] as $defaultKey => $defaultValue) {
24
            Tools::runSetter($result, $defaultKey, $defaultValue);
25
        }
26
    }
27
28
    private function setupResultObject()
29
    {

src/Detection/DeviceDetector.php 1 location

@@ 18-26 (lines=9) @@
15
    }
16
17
18
    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
28
    private function setupResultObject()
29
    {

src/Detection/OsDetector.php 1 location

@@ 17-25 (lines=9) @@
14
        $this->setupResultObject();
15
    }
16
17
    private function initResultObject()
18
    {
19
        $result = $this->detector->getResultObject()->getOs();
20
21
        // init default value from data
22
        foreach ($this->config['default'] as $defaultKey => $defaultValue) {
23
            Tools::runSetter($result, $defaultKey, $defaultValue);
24
        }
25
    }
26
27
    private function setupResultObject()
28
    {