NotBlankFilter::__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 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Jackal\Copycat\Filter\ValueFilter;
4
5
/**
6
 * Class NotBlankFilter
7
 * @package Jackal\Copycat\Filter\ValueFilter
8
 */
9
class NotBlankFilter extends EqualFilter{
10
    public function __construct($fieldName)
11
    {
12
        parent::__construct($fieldName, '');
0 ignored issues
show
Bug introduced by
'' of type string is incompatible with the type integer expected by parameter $comparedValue of Jackal\Copycat\Filter\Va...reFilter::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
        parent::__construct($fieldName, /** @scrutinizer ignore-type */ '');
Loading history...
13
    }
14
15
    public function __invoke($value)
16
    {
17
        return !parent::__invoke($value);
18
    }
19
20
21
}
22