Code Duplication    Length = 7-9 lines in 2 locations

lib/WebDriver/WebDriver.php 2 locations

@@ 79-87 (lines=9) @@
76
        $this->logger = $logger;
77
    }
78
79
    public function findElements(WebDriverBy $by)
80
    {
81
        $this->logFind($by->getMechanism(), $by->getValue());
82
        $elements = parent::findElements($by);
83
        foreach ($elements as $element) {
84
            $this->logElement($element);
85
        }
86
        return $elements;
87
    }
88
89
    public function findElement(WebDriverBy $by)
90
    {
@@ 89-95 (lines=7) @@
86
        return $elements;
87
    }
88
89
    public function findElement(WebDriverBy $by)
90
    {
91
        $this->logFind($by->getMechanism(), $by->getValue());
92
        $element = parent::findElement($by);
93
        $this->logElement($element);
94
        return $element;
95
    }
96
97
    public function elementExists($selector, $by = 'byId')
98
    {