Code Duplication    Length = 12-12 lines in 2 locations

src/EngineWorks/Pivot/Pivot.php 2 locations

@@ 244-255 (lines=12) @@
241
        return $return;
242
    }
243
244
    public function getCurrentColumns()
245
    {
246
        $return = [];
247
        foreach ($this->columns as $column) {
248
            $field = $this->getFieldElement($column);
249
            $return[] = [
250
                'caption' => $field->getCaption(),
251
                'fieldname' => $field->getFieldname(),
252
            ];
253
        }
254
        return $return;
255
    }
256
257
    public function getCurrentRows()
258
    {
@@ 257-268 (lines=12) @@
254
        return $return;
255
    }
256
257
    public function getCurrentRows()
258
    {
259
        $return = [];
260
        foreach ($this->rows as $row) {
261
            $field = $this->getFieldElement($row);
262
            $return[] = [
263
                'caption' => $field->getCaption(),
264
                'fieldname' => $field->getFieldname(),
265
            ];
266
        }
267
        return $return;
268
    }
269
270
    public function hasColumns()
271
    {