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.
Failed Conditions
Push — develop ( 97d950...17c62d )
by Maxime
19:32
created

Console/Commands/AbstractPluginCommand.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Console\Commands;
14
15
use Symfony\Component\Console\Input\InputArgument;
16
use Symfony\Component\Console\Output\OutputInterface;
17
18
/**
19
 * An abstract from commands related to plugins.
20
 */
21
class AbstractPluginCommand extends AbstractCommand
22
{
23
    /**
24
     * The plugin task to fire.
25
     *
26
     * @var string
27
     */
28
    protected $pluginTask;
29
30
    /**
31
     * Whether the command's task should be built
32
     * into a pipeline or run straight.
33
     *
34
     * @var bool
35
     */
36
    protected $straight = true;
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function fire()
42
    {
43
        $this->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
0 ignored issues
show
Documentation Bug introduced by Maxime Fabre
The method setVerbosity does not exist on object<Rocketeer\Console...\AbstractPluginCommand>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
44
45
        return $this->fireTasksQueue($this->pluginTask);
46
    }
47
48
    /**
49
     * Get the console command arguments.
50
     *
51
     * @return string[][]
52
     */
53
    protected function getArguments()
54
    {
55
        return [
56
            ['package', InputArgument::OPTIONAL, 'The package to publish the configuration for'],
57
        ];
58
    }
59
}
60