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.

DnsCheckCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Kunstmaan\Skylab\Command;
4
5
use Symfony\Component\Console\Input\InputArgument;
6
7
class DnsCheckCommand extends AbstractCommand
8
{
9
    protected function configure()
10
    {
11
        $this
12
            ->addDefaults()
13
            ->setName('dnscheck')
14
            ->setDescription('Get the current DNS settings for all domains configured for this project')
15
            ->addArgument('project', InputArgument::OPTIONAL, 'The name of the Skylab project')
16
            ->setHelp(<<<EOT
17
The <info>nameservercheck</info> command get the current DNS settings for all domains configured for this project.
18
19
<info>php skylab.phar nameservercheck testproject</info>
20
EOT
21
            );
22
    }
23
24
    /**
25
     * @throws \RuntimeException
26
     */
27
    protected function doExecute()
28
    {
29
        $projectname = $this->dialogProvider->askFor("Please enter the name of the project", 'project');
30
        if ($this->fileSystemProvider->projectExists($projectname)) {
31
            $project = $this->projectConfigProvider->loadProjectConfig($projectname);
32
            $domains = array_merge(array($project['url']), $project['aliases']);
33
            $results = array();
34
            foreach ($domains as $domain) {
35
                $dnsSettings = $this->processProvider->executeCommand('dig +short ' . $domain);
36
                $results[] = array($domain, trim($dnsSettings)."\n");
37
            }
38
39
            $this->dialogProvider->renderTable(array('Project', 'DNS settings'), $results);
40
        } else {
41
            $this->dialogProvider->logError('Project not found');
42
        }
43
    }
44
}
45