Passed
Push — master ( f652cc...414045 )
by Radu
01:16
created

AbstractDataTables   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 7 1
1
<?php
2
namespace WebServCo\Framework\DataTables;
3
4
abstract class AbstractDataTables implements \WebServCo\Framework\Interfaces\DataTablesInterface
5
{
6
    abstract protected function getData(Request $request);
7
    abstract protected function getRecordsFiltered();
8
    abstract protected function getRecordsTotal();
9
10
    public function getResponse(Request $request)
11
    {
12
        return new Response(
13
            $request->getDraw(),
14
            $this->getRecordsTotal(),
15
            $this->getRecordsFiltered(),
16
            $this->getData($request)
17
        );
18
    }
19
}
20