Completed
Push — master ( 68be21...073c54 )
by Kévin
02:41
created

Eloquent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 2
A getExecutorTraits() 0 7 1
1
<?php
2
3
namespace RulerZ\Target\Eloquent;
4
5
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
6
use Illuminate\Database\Query\Builder as QueryBuilder;
7
8
use RulerZ\Target\AbstractSqlTarget;
9
10
class Eloquent extends AbstractSqlTarget
11
{
12
    /**
13
     * @inheritDoc
14
     */
15
    public function supports($target, $mode)
16
    {
17
        return $target instanceof QueryBuilder || $target instanceof EloquentBuilder;
18
    }
19
20
    /**
21
     * @inheritDoc
22
     */
23
    protected function getExecutorTraits()
24
    {
25
        return [
26
            '\RulerZ\Executor\Eloquent\FilterTrait',
27
            '\RulerZ\Executor\Polyfill\FilterBasedSatisfaction',
28
        ];
29
    }
30
}
31