Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
81 | public static function getStub(string $stubPath, array $replacements = []): string |
||
82 | { |
||
83 | $content = file_get_contents($stubPath); |
||
84 | |||
85 | foreach ($replacements as $key => $value) { |
||
86 | $content = str_replace('{{' . Str::upper($key) . '}}', $value, $content); |
||
87 | } |
||
88 | |||
89 | return $content; |
||
90 | } |
||
92 |