1 | <?php |
||
9 | abstract class BaseTenantableCommand extends Command |
||
10 | { |
||
11 | /** |
||
12 | * Declare the handle method as final and use it to traverse through tenants. |
||
13 | */ |
||
14 | final public function handle() |
||
31 | |||
32 | /** |
||
33 | * @param \TomSchlick\Townhouse\Tenant $tenant |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | abstract public function handleTenant(Tenant $tenant) : void; |
||
38 | |||
39 | /** |
||
40 | * Get or ask for the tenant(s) you'd like to run the commands on. |
||
41 | * |
||
42 | * @return \Illuminate\Support\Collection|null |
||
43 | */ |
||
44 | protected function parseTenantInput() : ?Collection |
||
63 | |||
64 | /** |
||
65 | * Get the console command arguments. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getArguments() |
||
73 | |||
74 | /** |
||
75 | * Get the console command options. |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | protected function getOptions() |
||
87 | |||
88 | /** |
||
89 | * Override the fire method as well. |
||
90 | */ |
||
91 | final public function fire() |
||
95 | |||
96 | /** |
||
97 | * Make Laravel ready for the tenant we want to run the command on. |
||
98 | * |
||
99 | * @param \TomSchlick\Townhouse\Tenant $tenant |
||
100 | */ |
||
101 | protected function bootstrapTenant(Tenant $tenant) |
||
111 | } |
||
112 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.