Passed
Push — master ( 9b561d...08d227 )
by y
01:25
created

PredicateTrait::isNotNull()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Helix\DB\SQL;
4
5
/**
6
 * Produces logical expressions for the instance.
7
 */
8
trait PredicateTrait {
9
10
    /**
11
     * `$this IS FALSE`
12
     *
13
     * @return Predicate
14
     */
15
    public function isFalse () {
16
        return new Predicate("{$this} IS FALSE");
17
    }
18
19
    /**
20
     * `$this IS NOT NULL`
21
     *
22
     * @return Predicate
23
     */
24
    public function isNotNull () {
25
        return new Predicate("{$this} IS NOT NULL");
26
    }
27
28
    /**
29
     * `$this IS NULL`
30
     *
31
     * @return Predicate
32
     */
33
    public function isNull () {
34
        return new Predicate("{$this} IS NULL");
35
    }
36
}