Completed
Push — develop ( 4758ca...918a98 )
by Abdelrahman
02:04
created

EloquentDataTable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A processResults() 0 11 1
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
     * @return array
18
     */
19
    protected function processResults($results, $object = false)
20
    {
21
        $processor = new DataProcessor(
22
            $results,
23
            $this->getColumnsDefinition(),
24
            $this->templates,
25
            $this->request->input('start')
26
        );
27
28
        return $processor->process($object);
29
    }
30
}
31