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.
Completed
Push — master ( 7229df...b9747e )
by Rémi
03:55
created

PredefinedHydratorGenerationCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
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\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * @codeCoverageIgnore
12
 */
13
class PredefinedHydratorGenerationCommand extends Command
14
{
15
    /**
16
     * @var HydratorFactory
17
     */
18
    private $hydratorFactory;
19
20
    /**
21
     * @var string[]
22
     */
23
    private $classes;
24
25
    /**
26
     * Constructor
27
     *
28
     * @param HydratorFactory $hydratorFactory
29
     * @param string[]        $classes
30
     * @param string          $name
31
     */
32
    public function __construct(HydratorFactory $hydratorFactory, array $classes, $name = null)
33
    {
34
        $this->hydratorFactory = $hydratorFactory;
35
        $this->classes = $classes;
36
37
        parent::__construct($name);
38
    }
39
40
    /**
41
     * Configures the command
42
     */
43
    protected function configure()
44
    {
45
        $this->setDescription('Generates hydrators cache files');
46
    }
47
48
    /**
49
     * Code executed when command invoked
50
     *
51
     * @param  InputInterface  $input
52
     * @param  OutputInterface $output
53
     * @return void
54
     */
55
    protected function execute(InputInterface $input, OutputInterface $output)
56
    {
57
        foreach ($this->classes as $className) {
58
            $output->write('Generating "<info>' . $className . '</info>" ');
59
            $this->hydratorFactory->getHydratorClassName($className);
60
            $output->writeLn('<comment>Done</comment>');
61
        }
62
    }
63
}
64