BooleanMatcher::isTrue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace PHPKitchen\CodeSpecs\Expectation\Matcher;
4
5
/**
6
 * BooleanMatcher is designed to check given boolean variable matches expectation.
7
 *
8
 * @package PHPKitchen\CodeSpecs\Expectation
9
 * @author Dima 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
19
        return $this;
20
    }
21
22
    /**
23
     * @return $this
24
     */
25
    public function isNotTrue() {
26
        $this->startStep('is not true')
27
             ->assertNotTrue();
28
29
        return $this;
30
    }
31
32
    /**
33
     * @return $this
34
     */
35
    public function isFalse() {
36
        $this->startStep('is false')
37
             ->assertFalse();
38
39
        return $this;
40
    }
41
42
    /**
43
     * @return $this
44
     */
45
    public function isNotFalse() {
46
        $this->startStep('is not false')
47
             ->assertNotFalse();
48
49
        return $this;
50
    }
51
}