GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

HydratorGenerationCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace RemiSan\Serializer\Console;
4
5
use RemiSan\Serializer\Hydrator\HydratorFactory;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputArgument;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
/**
12
 * @codeCoverageIgnore
13
 */
14
class HydratorGenerationCommand extends Command
15
{
16
    /**
17
     * Configures the command.
18
     */
19
    protected function configure()
20
    {
21
        $this->setDescription('Generates hydrators cache files')
22
             ->addArgument('cache-path', InputArgument::REQUIRED, 'The path of the directory for the cached files')
23
             ->addArgument('class', InputArgument::REQUIRED, 'The FQCN of the class to generate proxy for');
24
    }
25
26
    /**
27
     * Code executed when command invoked.
28
     *
29
     * @param InputInterface  $input
30
     * @param OutputInterface $output
31
     */
32
    protected function execute(InputInterface $input, OutputInterface $output)
33
    {
34
        $proxyPath = $input->getArgument('cache-path');
35
        $className = $input->getArgument('class');
36
37
        $hydratorFactory = new HydratorFactory($proxyPath);
38
39
        $output->write('Generating "<info>' . $className . '</info>" ');
40
        $hydratorFactory->getHydratorClassName($className);
41
        $output->writeLn('<comment>Done</comment>');
42
    }
43
}
44