Code Duplication    Length = 9-9 lines in 2 locations

src/EngineWorks/Pivot/Pivot.php 2 locations

@@ 187-195 (lines=9) @@
184
        $this->filters->addItem(new Filter($fieldname, $operator, $arguments));
185
    }
186
187
    public function addColumn($fieldname)
188
    {
189
        if (! $this->fields->exists($fieldname)) {
190
            throw new PivotException("Invalid field name $fieldname");
191
        }
192
        if (! in_array($fieldname, $this->columns)) {
193
            $this->columns[] = $fieldname;
194
        }
195
    }
196
197
    public function addRow($fieldname)
198
    {
@@ 197-205 (lines=9) @@
194
        }
195
    }
196
197
    public function addRow($fieldname)
198
    {
199
        if (! $this->fields->exists($fieldname)) {
200
            throw new PivotException("Invalid field name $fieldname");
201
        }
202
        if (! in_array($fieldname, $this->rows)) {
203
            $this->rows[] = $fieldname;
204
        }
205
    }
206
207
    /**
208
     * @param string $fieldname