Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | abstract class AbstractReservedWord extends AbstractYamlReader |
||
8 | { |
||
9 | public const MAIN_KEY = 'reserved_keywords'; |
||
10 | public const CASE_SENSITIVE_KEY = 'case_sensitive'; |
||
11 | public const CASE_INSENSITIVE_KEY = 'case_insensitive'; |
||
12 | |||
13 | protected array $keywords = []; |
||
14 | |||
15 | 12 | protected function __construct(string $filename) |
|
18 | } |
||
19 | |||
20 | 832 | public function is(string $keyword): bool |
|
21 | { |
||
22 | 832 | return in_array($keyword, $this->keywords[self::CASE_SENSITIVE_KEY], true) || in_array(mb_strtolower($keyword), $this->keywords[self::CASE_INSENSITIVE_KEY], true); |
|
23 | } |
||
24 | |||
25 | 12 | protected function parseReservedKeywords(string $filename): AbstractReservedWord |
|
36 | } |
||
37 | } |
||
38 |