Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait Contains |
||
10 | { |
||
11 | 14 | protected function isValidation(string $filename, bool $is_path = false): bool |
|
12 | { |
||
13 | 14 | $this->log('Does the file contain validation messages?', $filename); |
|
|
|||
14 | |||
15 | 14 | $filename = $is_path ? Path::filename($filename) : $filename; |
|
16 | |||
17 | 14 | return Str::startsWith($filename, 'validation'); |
|
18 | } |
||
19 | |||
20 | 15 | protected function isJson(string $filename): bool |
|
21 | { |
||
22 | 15 | $this->log('Does the file contain json?', $filename); |
|
23 | |||
24 | 15 | return Str::endsWith($filename, 'json'); |
|
25 | } |
||
26 | |||
27 | 14 | protected function isPhp(string $filename): bool |
|
28 | { |
||
29 | 14 | $this->log('Does the file contain php?', $filename); |
|
30 | |||
31 | 14 | return Str::endsWith($filename, 'php'); |
|
32 | } |
||
33 | |||
34 | 24 | protected function isEnglish(string $locale): bool |
|
39 | } |
||
40 | } |
||
41 |