Completed
Push — develop ( 8fda15...dbbcf5 )
by Jaap
14s
created

CilexCompatibilityLayerBundle.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
declare(strict_types=1);
4
5
namespace phpDocumentor\Application\CilexCompatibilityLayer;
6
7
use phpDocumentor\Application;
8
use phpDocumentor\Command\Helper\ConfigurationHelper;
9
use phpDocumentor\Command\Helper\LoggerHelper;
10
use phpDocumentor\Configuration;
11
use Symfony\Component\Console\Input\InputOption;
12
use Symfony\Component\HttpKernel\Bundle\Bundle;
13
14
final class CilexCompatibilityLayerBundle extends Bundle
15
{
16
    public function boot()
17
    {
18
        parent::boot();
19
20
        $this->container->get(Application::class);
21
    }
22
23
    public function registerCommands(\Symfony\Component\Console\Application $application)
24
    {
25
//        $application->getHelperSet()->set(new LoggerHelper());
0 ignored issues
show
Unused Code Comprehensibility introduced by
69% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
26
//        $application->getHelperSet()->set(new ConfigurationHelper($this->container->get('config')));
27
28
        $application->getDefinition()->addOption(
29
            new InputOption(
30
                'config',
31
                'c',
32
                InputOption::VALUE_OPTIONAL,
33
                'Location of a custom configuration file'
34
            )
35
        );
36
        $application->getDefinition()->addOption(
37
            new InputOption('log', null, InputOption::VALUE_OPTIONAL, 'Log file to write to')
38
        );
39
40
        if ($this->container->has('phpdocumentor.compatibility.extra_commands')) {
41
            $commands = $this->container->get('phpdocumentor.compatibility.extra_commands');
42
43
            foreach ($commands as $command) {
44
                $application->add($command);
45
            }
46
        }
47
    }
48
}
49