Completed
Push — dev ( 6bece5...cad8d6 )
by Zach
02:11
created

ConsoleGenerate::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Commands;
4
5
use Yarak\Config\Config;
6
use Yarak\Console\DirectoryCreator;
7
8 View Code Duplication
class ConsoleGenerate extends YarakCommand
1 ignored issue
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * Configure the command.
12
     */
13
    protected function configure()
14
    {
15
        $this->setName('console:generate')
16
            ->setDescription('Generate the console directory structure.')
17
            ->setHelp(
18
                'This command will create all the console directories and files necessary for the Yarak console componet to run.'
19
            );
20
    }
21
22
    /**
23
     * Handle the command.
24
     */
25
    protected function handle()
26
    {
27
        $creator = new DirectoryCreator(
28
            Config::getInstance($this->configArray),
29
            $this->getOutput()
30
        );
31
32
        $creator->create();
33
    }
34
}
35