Completed
Push — dev ( 6d8737...fe3822 )
by Zach
02:19
created

DBGenerate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 2
lcom 2
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 8 1
A handle() 0 9 1
1
<?php
2
3
namespace Yarak\Commands;
4
5
use Yarak\Config\Config;
6
use Yarak\DB\DirectoryCreator;
7
8
class DBGenerate extends YarakCommand
9
{
10
    /**
11
     * Configure the command.
12
     */
13
    protected function configure()
14
    {
15
        $this->setName('db:generate')
16
            ->setDescription('Generate the database directory structure.')
17
            ->setHelp(
18
                'This command will create all the database directories and files necessary for yarak 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