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.

ExportPlaylistCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 5
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 12 1
A execute() 0 7 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: wechsler
5
 * Date: 11/02/2017
6
 * Time: 20:20
7
 */
8
9
namespace Phase\TakeATicketBundle\Command;
10
11
use Phase\TakeATicket\PlaylistExporter;
12
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
13
use Symfony\Component\Console\Input\InputArgument;
14
use Symfony\Component\Console\Input\InputInterface;
15
use Symfony\Component\Console\Output\OutputInterface;
16
17
class ExportPlaylistCommand extends ContainerAwareCommand
18
{
19
    protected function configure()
20
    {
21
        $this
22
            // the name of the command (the part after "bin/console")
23
            ->setName('ticket:export-playlist')
24
            // the short description shown while running "php bin/console list"
25
            ->setDescription('Export playlist')
26
            // the full command description shown when running the command with
27
            // the "--help" option
28
            ->setHelp("Export playlist to CSV file")
29
            ->addArgument('file', InputArgument::REQUIRED, 'Name of the CSV file.');
30
    }
31
32
    protected function execute(InputInterface $input, OutputInterface $output)
33
    {
34
        $file = $input->getArgument('file');
35
        $exporter = new PlaylistExporter($this->getContainer()->get('database_connection'));
36
        $exporter->exportToFile($file);
37
        $output->writeln("Wrote playlist to $file");
38
    }
39
}
40