| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | trait Mailcode_Traits_Commands_Validation_RegexEnabled |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * @var boolean |
||
| 31 | */ |
||
| 32 | protected $regexEnabled = false; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
||
| 36 | */ |
||
| 37 | protected $regexToken; |
||
| 38 | |||
| 39 | protected function validateSyntax_regex_enabled() : void |
||
| 40 | { |
||
| 41 | $val = $this->validator->createKeyword('regex'); |
||
| 42 | |||
| 43 | $this->regexEnabled = $val->isValid(); |
||
| 44 | |||
| 45 | if($val->isValid()) |
||
| 46 | { |
||
| 47 | $this->regexToken = $val->getToken(); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | public function isRegexEnabled() : bool |
||
| 52 | { |
||
| 53 | return $this->regexEnabled; |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getRegexToken() : ?Mailcode_Parser_Statement_Tokenizer_Token_Keyword |
||
| 64 | } |
||
| 65 | } |
||
| 66 |