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.

ExtractNavigationXpath::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 9
nc 1
nop 2
1
<?php
2
3
namespace Magium\Magento\Cli\Command;
4
5
use Magium\Magento\Cli\Command\Test\ExtractNavigationXpathTest;
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
class ExtractNavigationXpath extends Command
12
{
13
14
    protected function configure()
15
    {
16
        $this->setName('magento:extract-navigation-xpath');
17
        $this->setDescription('Will run a series of tests on the provided URL to attempt to extract the navigation Xpath for the theme configuration');
18
        $this->addArgument(
19
            'url',
20
            InputArgument::REQUIRED,
21
            'The URL to test against'
22
        );
23
        $this->addArgument(
24
            'category',
25
            InputArgument::REQUIRED,
26
            'The category path to use as a base (e.g. Accessories/Jewelry)'
27
        );
28
    }
29
30
    protected function execute(InputInterface $input, OutputInterface $output)
31
    {
32
        $test = new ExtractNavigationXpathTest();
33
        $test->setName('testExecute');
34
        $test->setUrl($input->getArgument('url'));
35
        $test->setCategory($input->getArgument('category'));
36
        $test->run();
37
38
        $output->writeln('Paste the following lines into your theme configuration file');
39
        $output->writeln(sprintf("\$this->navigationBaseXPathSelector = '%s';", $test->getBaseXpath()));
40
        $output->writeln(sprintf("\$this->navigationChildXPathSelector = '%s';", $test->getChildXpath()));
41
    }
42
43
}