Passed
Push — master ( 4ee327...62eb0a )
by Dmitry
02:50
created

NumberMatcher::isNan()   A

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\CodeSpecs\Expectation\Matcher;
4
5
/**
6
 * NumberMatcher is designed to check given number matches expectation.
7
 *
8
 * @author Dmitry 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
        return $this;
18
    }
19
20
    /**
21
     * @return $this
22
     */
23
    public function isInfinite(): self {
24
        $this->startStep('is infinite')
25
            ->assertInfinite();
26
        return $this;
27
    }
28
29
    /**
30
     * @return $this
31
     */
32
    public function isNan(): self {
33
        $this->startStep('is nan')
34
            ->assertNan();
35
        return $this;
36
    }
37
}