BooleanMatcher::isNotTrue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PHPKitchen\CodeSpecsCore\Expectation\Matcher;
4
5
/**
6
 * BooleanMatcher is designed to check given boolean variable matches expectation.
7
 *
8
 * @package PHPKitchen\CodeSpecsCore\Expectation
9
 * @author Dmitry Kolodko <[email protected]>
10
 */
11
class BooleanMatcher extends ValueMatcher {
12
    /**
13
     * @return $this
14
     */
15
    public function isTrue() {
16
        $this->startStep('is true')
17
            ->assertTrue();
18
        return $this;
19
    }
20
21
    /**
22
     * @return $this
23
     */
24
    public function isNotTrue() {
25
        $this->startStep('is not true')
26
            ->assertNotTrue();
27
        return $this;
28
    }
29
30
    /**
31
     * @return $this
32
     */
33
    public function isFalse() {
34
        $this->startStep('is false')
35
            ->assertFalse();
36
        return $this;
37
    }
38
39
    /**
40
     * @return $this
41
     */
42
    public function isNotFalse() {
43
        $this->startStep('is not false')
44
            ->assertNotFalse();
45
        return $this;
46
    }
47
}