1 | <?php |
||
8 | abstract class BaseTenantableCommand extends Command |
||
9 | { |
||
10 | /** |
||
11 | * Declare the handle method as final and use it to traverse through tenants. |
||
12 | */ |
||
13 | final public function handle() |
||
30 | |||
31 | /** |
||
32 | * @param \TomSchlick\Townhouse\Tenant $tenant |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | abstract public function handleTenant(Tenant $tenant) : void; |
||
37 | |||
38 | /** |
||
39 | * Get or ask for the tenant(s) you'd like to run the commands on. |
||
40 | * |
||
41 | * @return \Illuminate\Support\Collection|null |
||
42 | */ |
||
43 | protected function parseTenantInput() : ?Collection |
||
62 | |||
63 | /** |
||
64 | * Get the console command arguments. |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | public function getArguments() |
||
72 | |||
73 | /** |
||
74 | * Get the console command options. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | protected function getOptions() |
||
86 | |||
87 | /** |
||
88 | * Override the fire method as well. |
||
89 | */ |
||
90 | final public function fire() |
||
94 | |||
95 | /** |
||
96 | * Make Laravel ready for the tenant we want to run the command on. |
||
97 | * |
||
98 | * @param \TomSchlick\Townhouse\Tenant $tenant |
||
99 | */ |
||
100 | protected function bootstrapTenant(Tenant $tenant) |
||
110 | } |
||
111 |
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.