1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-15 00:04:04 +00:00

Apply fixes from StyleCI

This commit is contained in:
stancl 2019-08-16 16:21:59 +00:00 committed by StyleCI Bot
parent 417330decd
commit 84890cdd1e
20 changed files with 73 additions and 73 deletions

View file

@ -34,14 +34,14 @@ class Install extends Command
]);
$this->info('✔️ Created config/tenancy.php');
file_put_contents(app_path('Http/Kernel.php'), str_replace(
\file_put_contents(app_path('Http/Kernel.php'), \str_replace(
'protected $middlewarePriority = [',
"protected \$middlewarePriority = [\n \Stancl\Tenancy\Middleware\InitializeTenancy::class,",
file_get_contents(app_path('Http/Kernel.php'))
\file_get_contents(app_path('Http/Kernel.php'))
));
$this->info('✔️ Set middleware priority');
file_put_contents(base_path('routes/tenant.php'),
\file_put_contents(base_path('routes/tenant.php'),
"<?php
/*

View file

@ -40,7 +40,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;
@ -48,13 +48,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()->end();
});