1 | <?php |
||
16 | class LengthMatcher extends AbstractMatcher |
||
17 | { |
||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $count; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | * |
||
26 | * @return TemplateInterface |
||
27 | */ |
||
28 | public function getDefaultTemplate() |
||
37 | |||
38 | /** |
||
39 | * Match the length of the countable interface or string against |
||
40 | * the expected value. |
||
41 | * |
||
42 | * @param string|array|Countable $actual |
||
43 | * @return mixed |
||
44 | */ |
||
45 | protected function doMatch($actual) |
||
61 | |||
62 | /** |
||
63 | * Determine if the native count() function can return a valid result |
||
64 | * on the actual value. |
||
65 | * |
||
66 | * @param mixed $actual |
||
67 | * @return bool |
||
68 | */ |
||
69 | protected function isCountable($actual) |
||
73 | } |
||
74 |