| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | protected function getMigrationPath() |
||
| 28 | { |
||
| 29 | if (! is_null($targetPath = $this->input->getOption('path'))) { |
||
| 30 | return $this->laravel->basePath().'/'.$targetPath; |
||
| 31 | } |
||
| 32 | |||
| 33 | if (! is_null($module = $this->input->getOption('module')) && $this->laravel->files->exists($modulePath = $this->laravel->path().DIRECTORY_SEPARATOR.$module)) { |
||
| 34 | return $modulePath.DIRECTORY_SEPARATOR.'database'.DIRECTORY_SEPARATOR.'migrations'; |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations'; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: