Code Duplication    Length = 11-11 lines in 3 locations

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[]

src/CL/Matrix/Matrix.php 2 locations

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