Completed
Push — master ( 3bf9bc...b65646 )
by Elf
05:11
created

DataTables::collection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace ElfSundae\Laravel\DataTables;
4
5
use Illuminate\Support\Collection;
6
use Yajra\DataTables\DataTables as BaseDataTables;
7
8
class DataTables extends BaseDataTables
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type ElfSundae\Laravel\DataTables\DataTables has been defined more than once; this definition is ignored, only the first definition in src/DataTables.php (L8-33) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function queryBuilder($builder)
14
    {
15
        return static::make($builder);
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function eloquent($builder)
22
    {
23
        return static::make($builder);
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function collection($collection)
30
    {
31
        return static::make($collection);
32
    }
33
}
34