Completed
Push — master ( 8b8afe...5f2bbe )
by Greg
02:21
created

StdinCommands::cat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
namespace RoboExample\Robo\Plugin\Commands;
3
4
use Consolidation\AnnotatedCommand\Input\StdinAwareInterface;
5
use Consolidation\AnnotatedCommand\Input\StdinAwareTrait;
6
use Symfony\Component\Console\Input\InputInterface;
7
8
class StdinCommands implements StdinAwareInterface
9
{
10
    use StdinAwareTrait;
11
12
    /**
13
     * @command cat
14
     * @param string $file
0 ignored issues
show
Bug introduced by Greg Anderson
There is no parameter named $file. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
15
     * @default $file -
16
     */
17
    public function cat(InputInterface $input)
18
    {
19
        return $this->stdin()->select($input, 'file')->contents();
20
    }
21
}
22