| 1 | <?php |
||
| 13 | class TypeMatcher extends AbstractMatcher |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $type; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritdoc} |
||
| 22 | * |
||
| 23 | * @param $actual |
||
| 24 | * @return Match |
||
| 25 | */ |
||
| 26 | public function match($actual = '') |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Determine if the actual value has the same type as the expected value. Uses the native gettype() |
||
| 35 | * function to compare. |
||
| 36 | * |
||
| 37 | * @param $actual |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function doMatch($actual) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | * |
||
| 50 | * @return TemplateInterface |
||
| 51 | */ |
||
| 52 | public function getDefaultTemplate() |
||
| 59 | } |
||
| 60 |