NumberMatcher   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isInfinite() 0 5 1
A isFinite() 0 5 1
A isNan() 0 5 1
1
<?php
2
3
namespace PHPKitchen\CodeSpecs\Expectation\Matcher;
4
5
/**
6
 * NumberMatcher is designed to check given number matches expectation.
7
 *
8
 * @author Dima Kolodko <[email protected]>
9
 */
10
class NumberMatcher extends ValueMatcher {
11
    /**
12
     * @return $this
13
     */
14
    public function isFinite(): self {
15
        $this->startStep('is finite')
16
             ->assertFinite();
17
18
        return $this;
19
    }
20
21
    /**
22
     * @return $this
23
     */
24
    public function isInfinite(): self {
25
        $this->startStep('is infinite')
26
             ->assertInfinite();
27
28
        return $this;
29
    }
30
31
    /**
32
     * @return $this
33
     */
34
    public function isNan(): self {
35
        $this->startStep('is nan')
36
             ->assertNan();
37
38
        return $this;
39
    }
40
}