Failed Conditions
Push — master ( bc79fb...9e41f7 )
by Denis
02:47
created

IsNull   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExpr() 0 5 1
A getName() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the QueryFilterBundle package.
5
 *
6
 * (c) Denis Voytyuk <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Artprima\QueryFilterBundle\Query\Condition;
13
14
use Doctrine\ORM\QueryBuilder;
15
16
/**
17
 * Class IsNull
18
 *
19
 * @author Denis Voytyuk <[email protected]>
20
 *
21
 * @package Artprima\QueryFilterBundle\Query\Condition
22
 */
23
class IsNull implements ConditionInterface
24
{
25
    public function getExpr(QueryBuilder $qb, string $field, int $index, array $val)
26
    {
27
        $expr = $qb->expr()->isNull($field);
28
29
        return $expr;
30
    }
31
32
    public function getName(): string
33
    {
34
        return 'is null';
35
    }
36
37
}