| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | protected function getPath($name) |
||
| 30 | { |
||
| 31 | $name = Str::replaceFirst($this->rootNamespace(), '', $name); |
||
| 32 | |||
| 33 | return ($this->option('base_path') ? |
||
| 34 | rtrim($this->option('base_path'), '\\/') . '/app' : |
||
| 35 | $this->laravel['path']) . |
||
| 36 | '/' . str_replace('\\', '/', $name) . '.php'; |
||
| 37 | } |
||
| 38 | |||
| 51 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: