AbstractQueryWithFilter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Sfneal\Queries;
4
5
use Sfneal\Queries\Interfaces\DynamicQuery;
6
use Sfneal\Queries\Traits\ApplyFilter;
7
8
abstract class AbstractQueryWithFilter extends AbstractQuery implements DynamicQuery
9
{
10
    // Uses Filter classes for applying queries
11
    use ApplyFilter;
12
13
    /**
14
     * Array of attribute/form input name keys and Filter class values.
15
     *
16
     * @var array
17
     */
18
    public $attribute_filters;
19
20
    /**
21
     * Filter values to be passed to Filer classes.
22
     *
23
     * @var array
24
     */
25
    public $filter;
26
27
    /**
28
     * QueryWithFilter constructor.
29
     *
30
     * @param string  $filter  name of the bucket to filter by
31
     */
32
    public function __construct($filter)
33
    {
34
        $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...
35
    }
36
}
37