mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-16 00:24:04 +00:00
Clean up
This commit is contained in:
parent
cbaa775876
commit
c9903cd43c
19 changed files with 212 additions and 215 deletions
|
|
@ -39,7 +39,7 @@ class Run extends Command
|
|||
|
||||
$callback = function ($prefix = '') {
|
||||
return function ($arguments, $argument) use ($prefix) {
|
||||
[$key, $value] = \explode('=', $argument, 2);
|
||||
[$key, $value] = explode('=', $argument, 2);
|
||||
$arguments[$prefix . $key] = $value;
|
||||
|
||||
return $arguments;
|
||||
|
|
@ -47,13 +47,13 @@ class Run extends Command
|
|||
};
|
||||
|
||||
// Turns ['foo=bar', 'abc=xyz=zzz'] into ['foo' => 'bar', 'abc' => 'xyz=zzz']
|
||||
$arguments = \array_reduce($this->option('argument'), $callback(), []);
|
||||
$arguments = array_reduce($this->option('argument'), $callback(), []);
|
||||
|
||||
// Turns ['foo=bar', 'abc=xyz=zzz'] into ['--foo' => 'bar', '--abc' => 'xyz=zzz']
|
||||
$options = \array_reduce($this->option('option'), $callback('--'), []);
|
||||
$options = array_reduce($this->option('option'), $callback('--'), []);
|
||||
|
||||
// Run command
|
||||
$this->call($this->argument('commandname'), \array_merge($arguments, $options));
|
||||
$this->call($this->argument('commandname'), array_merge($arguments, $options));
|
||||
|
||||
tenancy()->endTenancy();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue