Skip to content

Commit bb0835b

Browse files
committed
fixed alias in commands
1 parent 7a10bd6 commit bb0835b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Commands/InstallCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class InstallCommand extends Command
2222
*
2323
* @var string
2424
*/
25-
protected $description = 'Install the specified module by given package name (vendor/name).';
25+
protected $description = 'Install the specified module by given package alias (vendor/name).';
2626

2727
/**
2828
* Create a new command instance.
@@ -37,14 +37,14 @@ public function __construct()
3737
*/
3838
public function handle()
3939
{
40-
if (is_null($this->argument('name'))) {
40+
if (is_null($this->argument('alias'))) {
4141
$this->installFromFile();
4242

4343
return;
4444
}
4545

4646
$this->install(
47-
$this->argument('name'),
47+
$this->argument('alias'),
4848
$this->argument('version'),
4949
$this->option('type'),
5050
$this->option('tree')
@@ -70,7 +70,7 @@ protected function installFromFile()
7070
$module = collect($module);
7171

7272
$this->install(
73-
$module->get('name'),
73+
$module->get('alias'),
7474
$module->get('version'),
7575
$module->get('type')
7676
);
@@ -85,10 +85,10 @@ protected function installFromFile()
8585
* @param string $type
8686
* @param bool $tree
8787
*/
88-
protected function install($name, $version = 'dev-master', $type = 'composer', $tree = false)
88+
protected function install($alias, $version = 'dev-master', $type = 'composer', $tree = false)
8989
{
9090
$installer = new Installer(
91-
$name,
91+
$alias,
9292
$version,
9393
$type ?: $this->option('type'),
9494
$tree ?: $this->option('tree')
@@ -123,7 +123,7 @@ protected function install($name, $version = 'dev-master', $type = 'composer', $
123123
protected function getArguments()
124124
{
125125
return [
126-
['name', InputArgument::OPTIONAL, 'The name of module will be installed.'],
126+
['alias', InputArgument::OPTIONAL, 'The alias of module will be installed.'],
127127
['version', InputArgument::OPTIONAL, 'The version of module will be installed.'],
128128
];
129129
}

src/Commands/MigrationMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function getArguments()
3838
{
3939
return [
4040
['name', InputArgument::REQUIRED, 'The migration name will be created.'],
41-
['module', InputArgument::OPTIONAL, 'The name of module will be created.'],
41+
['alias', InputArgument::OPTIONAL, 'The alias of module will be created.'],
4242
];
4343
}
4444

src/Commands/SeedCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function moduleSeed(Module $module)
100100
$config = $module->get('migration');
101101

102102
if (is_array($config) && array_key_exists('seeds', $config)) {
103-
foreach ((array)$config['seeds'] as $class) {
103+
foreach ((array) $config['seeds'] as $class) {
104104
if (class_exists($class)) {
105105
$seeders[] = $class;
106106
}

0 commit comments

Comments
 (0)