Code Duplication    Length = 7-7 lines in 2 locations

sources/GenericCollections/Traits/DequeCommonMethods.php 2 locations

@@ 44-50 (lines=7) @@
41
        return '';
42
    }
43
44
    public function addFirst($element)
45
    {
46
        if ('' !== $errorMessage = $this->checkAddOffer($element)) {
47
            throw new \InvalidArgumentException($errorMessage);
48
        }
49
        $this->storage->unshift($element);
50
    }
51
52
    public function addLast($element)
53
    {
@@ 52-58 (lines=7) @@
49
        $this->storage->unshift($element);
50
    }
51
52
    public function addLast($element)
53
    {
54
        if ('' !== $errorMessage = $this->checkAddOffer($element)) {
55
            throw new \InvalidArgumentException($errorMessage);
56
        }
57
        $this->storage->push($element);
58
    }
59
60
    public function offerFirst($element)
61
    {