SourceListCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 7 2
A setGridSourceManager() 0 3 1
A configure() 0 5 1
1
<?php
2
3
namespace Dtc\GridBundle\Command;
4
5
use Dtc\GridBundle\Manager\GridSourceManager;
6
use Symfony\Component\Console\Command\Command;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Command\Command was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Symfony\Component\Console\Input\InputInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Input\InputInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Component\Console\Output\OutputInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Output\OutputInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * @deprecated
12
 *
13
 * Class SourceListCommand
14
 */
15
class SourceListCommand extends Command
16
{
17
    private $gridSourceManager;
18
19
    protected function configure()
20
    {
21
        $this
22
        ->setName('dtc:grid:source:list')
23
        ->setDescription('List avaliable Grid Sources')
24
        ;
25
    }
26
27
    public function setGridSourceManager(GridSourceManager $gridSourceManager)
28
    {
29
        $this->gridSourceManager = $gridSourceManager;
30
    }
31
32
    protected function execute(InputInterface $input, OutputInterface $output)
33
    {
34
        $gridSources = $this->gridSourceManager->all();
35
36
        $output->writeln('Avaliable Grid Sources: ');
37
        foreach ($gridSources as $id => $source) {
38
            $output->writeln("{$id} => ".get_class($source));
39
        }
40
    }
41
}
42