ToBe   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 4
Bugs 1 Features 1
Metric Value
wmc 1
c 4
b 1
f 1
lcom 0
cbo 2
dl 0
loc 14
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
 * Alias of ToEuqal.
15
 *
16
 * <code>
17
 * $matcher = new ToBe(100);
18
 * $matcher->match(100); //return true
19
 *
20
 * $matcher = new ToBe(100);
21
 * $matcher->match(99); //return false
22
 * <code>
23
 *
24
 * @author Noritaka Horio <[email protected]>
25
 * @copyright Noritaka Horio <[email protected]>
26
 *
27
 * @see expect\matcher\ToEqual
28
 */
29
final class ToBe implements ReportableMatcher
30
{
31
    use EqualMatcherDelegatable;
32
33
    /**
34
     * Create a new matcher.
35
     *
36
     * @param mixed $expected expected value
37
     */
38
    public function __construct($expected)
39
    {
40
        $this->equalMatcher = new ToEqual($expected);
41
    }
42
}
43