AssembleCommand::fire()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 2
Metric Value
c 3
b 1
f 2
dl 0
loc 10
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace R\Hive\Commands;
4
5
use Illuminate\Console\Command;
6
use Symfony\Component\Console\Input\InputArgument;
7
8
class AssembleCommand extends Command
9
{
10
    protected $name = 'hive:assemble';
11
12
    protected $description = 'Create a new Hive RESTful HTTP resource collection.';
13
14
    public function fire()
15
    {
16
        $name = $this->argument('name');
17
18
        $this->call('hive:instance', ['name' => $name, '-e' => 'bar', '-m' => 'bar']);
19
        $this->call('hive:factory', ['name' => $name, '-i' => 'bar']);
20
        $this->call('hive:repo', ['name' => $name, '-o' => 'bar']);
21
        $this->call('hive:mutator', ['name' => $name.'Request', '-r' => 'bar']);
22
        $this->call('hive:controller', ['name' => $name]);
23
    }
24
25
    protected function getArguments()
26
    {
27
        return [
28
            ['name', InputArgument::REQUIRED, 'The name of the instance.'],
29
        ];
30
    }
31
}
32