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

IsNotNull::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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 IsNotNull
18
 *
19
 * @author Denis Voytyuk <[email protected]>
20
 *
21
 * @package Artprima\QueryFilterBundle\Query\Condition
22
 */
23
class IsNotNull implements ConditionInterface
24
{
25
    public function getExpr(QueryBuilder $qb, string $field, int $index, array $val)
26
    {
27
        $expr = $qb->expr()->isNotNull($field);
28
29
        return $expr;
30
    }
31
32
    public function getName(): string
33
    {
34
        return 'is not null';
35
    }
36
37
}