Issues (632)

src/Inputs/RadioInput.php (27 issues)

1
<?php
0 ignored issues
show
This file is missing a doc comment.
Loading history...
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Filename "RadioInput.php" doesn't match the expected filename "radioinput.php"
Loading history...
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace EddIriarte\Console\Inputs;
4
5
use EddIriarte\Console\Inputs\Exceptions\UnknownOption;
6
7
8
/**
9
 * Class RadioInput
10
 * @package EddIriarte\Console\Inputs
0 ignored issues
show
Coding Style Documentation introduced by
@package tag is not allowed in class comment
Loading history...
There must be exactly one blank line before the tags in a doc comment
Loading history...
11
 * @author Eduardo Iriarte <eddiriarte[at]gmail[dot]com>
0 ignored issues
show
Coding Style Documentation introduced by
@author tag is not allowed in class comment
Loading history...
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
12
 */
0 ignored issues
show
Missing @category tag in class comment
Loading history...
Missing @license tag in class comment
Loading history...
Missing @link tag in class comment
Loading history...
13
class RadioInput extends AbstractSelect
14
{
0 ignored issues
show
Opening brace should be on the same line as the declaration for class RadioInput
Loading history...
15
    /**
0 ignored issues
show
Parameter $option should have a doc-comment as per coding-style.
Loading history...
16
     * {@inheritdoc}
17
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
18 3
    public function select(string $option): void
0 ignored issues
show
Expected 2 blank lines before function; 0 found
Loading history...
19
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
20 3
        if (empty(array_intersect($this->options, [$option]))) {
0 ignored issues
show
Short array syntax is not allowed
Loading history...
21 1
            throw new UnknownOption($option);
22
        }
23
24 2
        $this->selections = $this->isSelected($option) ? [] : [$option];
0 ignored issues
show
The value of a comparison must not be assigned to a variable
Loading history...
Inline IF statements are not allowed
Loading history...
Short array syntax is not allowed
Loading history...
25 2
    }
0 ignored issues
show
Expected 2 blank lines after function; 0 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end select()
Loading history...
26
}
0 ignored issues
show
Expected //end class
Loading history...
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
27