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 ( e0e433...cfcc97 )
by Bruno
05:15
created

YumlCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Onurb\Bundle\YumlBundle\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputOption;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * Generate and save Yuml images for metadata graphs.
12
 *
13
 * @license MIT
14
 * @author Glynn Forrest <[email protected]>
15
 **/
16
class YumlCommand extends ContainerAwareCommand
17
{
18 1
    protected function configure()
19
    {
20 1
        $this->setName('yuml:mappings')
21 1
            ->setDescription('Generate an image from yuml.me of doctrine metadata')
22 1
            ->addOption(
23 1
                'filename',
24 1
                'f',
25 1
                InputOption::VALUE_REQUIRED,
26 1
                'Output filename',
27 1
                'yuml-mapping.png'
28
            );
29 1
    }
30
31 1
    protected function execute(InputInterface $input, OutputInterface $output)
32
    {
33 1
        $yumlClient = $this->getContainer()->get('onurb.doctrine_yuml.client');
34 1
        $filename = $input->getOption('filename');
35
36 1
        $graphUrl = $yumlClient->getGraphUrl($yumlClient->makeDslText());
37 1
        $yumlClient->downloadImage($graphUrl, $filename);
38
39 1
        $output->writeln(sprintf('Downloaded <info>%s</info> to <info>%s</info>', $graphUrl, $filename));
40 1
    }
41
}
42