These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Spatie\BladeX\ComponentDirectory; |
||
4 | |||
5 | use Symfony\Component\Finder\SplFileInfo; |
||
6 | |||
7 | abstract class ComponentDirectory |
||
8 | { |
||
9 | abstract function getAbsoluteDirectory(): string; |
||
0 ignored issues
–
show
|
|||
10 | |||
11 | public function getViewName(SplFileInfo $viewFile): string |
||
12 | { |
||
13 | $view = str_replace_last('.blade.php', '', $viewFile->getFilename()); |
||
14 | |||
15 | return "{$this->viewDirectory}.{$view}"; |
||
16 | } |
||
17 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.