InclusionResult   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMatchResults() 0 4 1
A getUnmatchResults() 0 4 1
A isMatched() 0 4 1
A __construct() 0 6 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\strategy;
12
13
final class InclusionResult
14
{
15
    /**
16
     * @var array
17
     */
18
    private $expectValues;
19
20
    /**
21
     * @var array
22
     */
23
    private $matchResults;
24
25
    /**
26
     * @var array
27
     */
28
    private $unmatchResults;
29
30
    /**
31
     * @param array expectValues
32
     * @param array matchResults
33
     * @param array unmatchResults
34
     */
35
    public function __construct(array $expectValues, array $matchResults, array $unmatchResults)
36
    {
37
        $this->expectValues = $expectValues;
38
        $this->matchResults = $matchResults;
39
        $this->unmatchResults = $unmatchResults;
40
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function getMatchResults()
46
    {
47
        return $this->matchResults;
48
    }
49
50
    /**
51
     * @return array
52
     */
53
    public function getUnmatchResults()
54
    {
55
        return $this->unmatchResults;
56
    }
57
58
    /**
59
     * @return bool
60
     */
61
    public function isMatched()
62
    {
63
        return count($this->matchResults) >= count($this->expectValues);
64
    }
65
}
66