ToBeNull   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 1
c 3
b 1
f 0
lcom 0
cbo 2
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of expect package.
5
 *
6
 * (c) Noritaka Horio <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
namespace expect\matcher;
12
13
/**
14
 * Verify whether the value is null.
15
 *
16
 * <code>
17
 * $matcher = new ToBeNull();
18
 * $matcher->match(null); //return true
19
 *
20
 * $matcher->match(0); //return false
21
 * </code>
22
 *
23
 * @author Noritaka Horio <[email protected]>
24
 * @copyright Noritaka Horio <[email protected]>
25
 */
26
final class ToBeNull implements ReportableMatcher
27
{
28
    use EqualMatcherDelegatable;
29
30
    /**
31
     * Create a new matcher.
32
     */
33
    public function __construct()
34
    {
35
        $this->equalMatcher = new ToEqual(null);
36
    }
37
}
38