Passed
Pull Request — master (#1)
by Roman
08:20
created

Grammar   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A compileAllowFiltering() 0 4 2
1
<?php
2
3
namespace lroman242\LaravelCassandra\Query;
4
5
use Illuminate\Database\Query\Grammars\Grammar as BaseGrammar;
6
7
class Grammar extends BaseGrammar
8
{
9
    /**
10
     * The components that make up a select clause.
11
     *
12
     * @var array
13
     */
14
    protected $selectComponents = [
15
        'aggregate',
16
        'columns',
17
        'from',
18
        'wheres',
19
        'orders',
20
        'limit',
21
        'groups',
22
        'allowFiltering'
23
    ];
24
25 19
    public function compileAllowFiltering(Builder $query, $bool)
0 ignored issues
show
Unused Code introduced by
The parameter $query is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
26
    {
27 19
        return (bool) $bool ? 'ALLOW FILTERING' : '';
28
    }
29
}
30