Code Duplication    Length = 11-11 lines in 3 locations

src/CL/Matrix/Matrix.php 2 locations

@@ 57-67 (lines=11) @@
54
     *
55
     * @return Row
56
     */
57
    public function getRow($offset)
58
    {
59
        if (!array_key_exists($offset, $this->rows)) {
60
            throw new \InvalidArgumentException(sprintf(
61
                'There is no row in this matrix with that offset: %s',
62
                $offset
63
            ));
64
        }
65
66
        return $this->rows[$offset];
67
    }
68
69
    /**
70
     * @return Row[]
@@ 114-124 (lines=11) @@
111
     *
112
     * @return Column
113
     */
114
    public function getColumn($offset)
115
    {
116
        if (!array_key_exists($offset, $this->columns)) {
117
            throw new \InvalidArgumentException(sprintf(
118
                'There is no column in this matrix with that offset: %s',
119
                $offset
120
            ));
121
        }
122
123
        return $this->columns[$offset];
124
    }
125
126
    /**
127
     * @return Column[]

src/CL/Matrix/Vector/AbstractVector.php 1 location

@@ 50-60 (lines=11) @@
47
     *
48
     * @return Element
49
     */
50
    public function getElement($offset)
51
    {
52
        if (!array_key_exists($offset, $this->elements)) {
53
            throw new \InvalidArgumentException(sprintf(
54
                'There is no element in this vector with that offset: %s',
55
                $offset
56
            ));
57
        }
58
59
        return $this->elements[$offset];
60
    }
61
62
    /**
63
     * @return Element[]