NotBlankFilter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 2
eloc 3
c 2
b 1
f 1
dl 0
loc 9
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __invoke() 0 3 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