Completed
Push — master ( 1e296c...dace5d )
by Faiz
02:40
created

ConfigViewCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 31
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 6 1
A execute() 0 7 1
1
<?php
2
3
namespace FaizShukri\Quran\Commands;
4
5
use FaizShukri\Quran\Supports\Config;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class ConfigViewCommand extends Command
11
{
12
    private $config;
13
14
    /**
15
     * @codeCoverageIgnore
16
     */
17
    public function __construct()
18
    {
19
        parent::__construct();
20
        $this->config = new Config();
21
    }
22
23
    /**
24
     * @codeCoverageIgnore
25
     */
26
    protected function configure()
27
    {
28
        $this
29
            ->setName('config:path')
30
            ->setDescription('View configuration path');
31
    }
32
33
    protected function execute(InputInterface $input, OutputInterface $output)
34
    {
35
        $output->writeln("Config file: <info>{$this->config->configFile}</info>");
36
        $output->writeln("Data directory: <info>{$this->config->dataDir}</info>");
37
38
        return 0;
39
    }
40
}
41