Conditions | 4 |
Paths | 4 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
70 | protected function loadedHelpers(): void |
||
71 | { |
||
72 | |||
73 | foreach (scandir(__DIR__ . DIRECTORY_SEPARATOR . 'helpers') as $helperFile) { |
||
74 | $path = sprintf( |
||
75 | '%s%s%s%s%s', |
||
76 | __DIR__, |
||
77 | DIRECTORY_SEPARATOR, |
||
78 | 'helpers', |
||
79 | DIRECTORY_SEPARATOR, |
||
80 | $helperFile |
||
81 | ); |
||
82 | |||
83 | if (!is_file($path)) { |
||
84 | continue; |
||
85 | } |
||
86 | |||
87 | $function = Str::before($helperFile, '.php'); |
||
88 | |||
89 | if (function_exists($function)) { |
||
90 | continue; |
||
91 | } |
||
92 | |||
93 | require_once $path; |
||
94 | } |
||
97 |