Passed
Push — master ( 74cbab...62dc6b )
by Stephen
02:33
created

AbstractQueryWithFilter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
4
namespace Sfneal\Queries;
5
6
7
use Sfneal\Queries\Interfaces\DynamicQuery;
8
use Sfneal\Queries\Traits\ApplyFilter;
9
10
abstract class AbstractQueryWithFilter extends AbstractQuery implements DynamicQuery
11
{
12
    // Uses Filter classes for applying queries
13
    use ApplyFilter;
14
15
    /**
16
     * Array of attribute/form input name keys and Filter class values
17
     *
18
     * @var array
19
     */
20
    public $attribute_filters;
21
22
    /**
23
     * Filter values to be passed to Filer classes
24
     *
25
     * @var array
26
     */
27
    public $filter;
28
29
    /**
30
     * QueryWithFilter constructor.
31
     *
32
     * @param string  $filter  name of the bucket to filter by
33
     */
34
    public function __construct($filter)
35
    {
36
        $this->filter = $filter;
0 ignored issues
show
Documentation Bug introduced by
It seems like $filter of type string is incompatible with the declared type array of property $filter.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
37
    }
38
}
39