ConfigViewCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 29
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 6 1
A __construct() 0 4 1
A configure() 0 5 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): int
34
    {
35
        $output->writeln("Config file: <info>{$this->config->configFile}</info>");
36
        $output->writeln("Data directory: <info>{$this->config->dataDir}</info>\n");
37
38
        return 0;
39
    }
40
}
41