| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | View Code Duplication | protected function makeLocaleRoutesPath($locale = null) |
|
| 51 | { |
||
| 52 | $path = $this->laravel->getCachedRoutesPath(); |
||
| 53 | if ($locale === null) { |
||
| 54 | return $path; |
||
| 55 | } |
||
| 56 | $path = substr($path, 0, -4).'_'.$locale.'.php'; |
||
| 57 | |||
| 58 | return $path; |
||
| 59 | } |
||
| 60 | |||
| 71 |
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: