1 | <?php |
||
10 | class MigrateDisorganise extends BaseCommand |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'migrate:disorganise'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Move migrations from a yyyy/mm folder structure back to the base migrations folder'; |
||
25 | |||
26 | /** |
||
27 | * The migrator instance. |
||
28 | * |
||
29 | * @var \Jaybizzle\MigrationsOrganiser\Migrator |
||
30 | */ |
||
31 | protected $migrator; |
||
32 | |||
33 | /** |
||
34 | * The filesystem instance. |
||
35 | * |
||
36 | * @var \Illuminate\Filesystem\Filesystem |
||
37 | */ |
||
38 | protected $files; |
||
39 | |||
40 | /** |
||
41 | * The basePath for the migrations. |
||
42 | */ |
||
43 | protected $basePath; |
||
44 | |||
45 | /** |
||
46 | * Create a new migrator instance. |
||
47 | * |
||
48 | * @param \Illuminate\Filesystem\Filesystem $files |
||
49 | * @param \Illuminate\Database\Migrations\Migrator $migrator |
||
50 | */ |
||
51 | public function __construct(Filesystem $files, Migrator $migrator) |
||
52 | { |
||
53 | parent::__construct(); |
||
54 | $this->migrator = $migrator; |
||
55 | $this->files = $files; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Fire the command. (Compatibility for < 5.5). |
||
60 | */ |
||
61 | public function fire() |
||
62 | { |
||
63 | $this->handle(); |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Create date folder structure and move migrations into. |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | public function handle() |
||
92 | |||
93 | /** |
||
94 | * Decide whether or not to delete directories. |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | public function cleanup() |
||
106 | |||
107 | /** |
||
108 | * Delete subdirectories in the migrations folder. |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | public function deleteDirs() |
||
122 | |||
123 | /** |
||
124 | * Get the console command options. |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | protected function getOptions() |
||
134 | } |
||
135 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: