BooleanMatcher   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 39
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isFalse() 0 5 1
A isTrue() 0 5 1
A isNotFalse() 0 5 1
A isNotTrue() 0 5 1
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
}