1: <?php
2:
3: /**
4: * This file is part of expect package.
5: *
6: * (c) Noritaka Horio <holy.shared.design@gmail.com>
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: