Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | protected function ensureIsPhpFile(string $file, string $contents) |
||
22 | { |
||
23 | abort_unless(Str::endsWith($file, '.php'), Response::HTTP_UNPROCESSABLE_ENTITY, 'Requested file is not a PHP file.'); |
||
24 | |||
25 | if (Str::endsWith($file, '.blade.php')) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | abort_unless(Str::startsWith($contents, '<?php'), Response::HTTP_UNPROCESSABLE_ENTITY, 'Requested file does not start with `<?php`.'); |
||
30 | } |
||
31 | } |
||
32 |