| 1 | <?php |
||
| 15 | class Optional extends AbstractRule |
||
| 16 | { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var \GetSky\ParserExpressions\RuleInterface |
||
| 20 | */ |
||
| 21 | protected $rule; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param array|string|RuleInterface $rule |
||
| 25 | * @param string $name |
||
| 26 | * @param callable $action |
||
| 27 | */ |
||
| 28 | 1 | public function __construct($rule, $name = "Optional", callable $action = null) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | */ |
||
| 38 | 1 | public function scan(Context $context) |
|
| 59 | } |
||
| 60 |