1 | <?php |
||
11 | class MigrateMakeCommand extends BaseMigrateMakeCommand |
||
12 | { |
||
13 | use ConfirmableTrait; |
||
14 | use ConsoleMakeModuleCommand; |
||
15 | |||
16 | /** |
||
17 | * The console command signature. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $signature = 'make:migration {name : The name of the migration.} |
||
22 | {--module= : The name of the module.} |
||
23 | {--create= : The table to be created.} |
||
24 | {--table= : The table to migrate.}'; |
||
25 | |||
26 | /** |
||
27 | * Write the migration file to disk. |
||
28 | * |
||
29 | * @param string $name |
||
30 | * @param string $table |
||
31 | * @param bool $create |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | protected function writeMigration($name, $table, $create): void |
||
41 | |||
42 | /** |
||
43 | * Build the directory for the class if necessary. |
||
44 | * |
||
45 | * @param string $path |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | protected function makeDirectory($path): string |
||
57 | |||
58 | /** |
||
59 | * Get migration path (either specified by '--path' or '--module' options). |
||
60 | * |
||
61 | * @throws \Exception |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | protected function getMigrationPath(): string |
||
73 | } |
||
74 |
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: