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