EloquentDataTable::processResults()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 9.9
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\DataTables;
6
7
use Cortex\Foundation\Processors\DataProcessor;
8
use Yajra\DataTables\EloquentDataTable as BaseEloquentDataTable;
9
10
class EloquentDataTable extends BaseEloquentDataTable
11
{
12
    /**
13
     * Get processed data.
14
     *
15
     * @param mixed $results
16
     * @param bool  $object
17
     *
18
     * @return array
19
     */
20
    protected function processResults($results, $object = false)
21
    {
22
        $processor = new DataProcessor(
23
            $results,
24
            $this->getColumnsDefinition(),
25
            $this->templates,
26
            $this->request->input('start')
27
        );
28
29
        return $processor->process($object);
30
    }
31
}
32