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

DBGenerate::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
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