Test Failed
Pull Request — master (#872)
by Maxim
10:54 queued 03:52
created

Option   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Console\Attribute;
6
7
use Spiral\Attributes\NamedArgumentConstructor;
8
use Symfony\Component\Console\Input\InputOption;
9
10
#[\Attribute(\Attribute::TARGET_PROPERTY), NamedArgumentConstructor]
11
final class Option
12
{
13
    /**
14
     * @param ?non-empty-string $name Option name. Property name by default
0 ignored issues
show
Documentation Bug introduced by
The doc comment ?non-empty-string at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in ?non-empty-string.
Loading history...
15
     * @param non-empty-string|array|null $shortcut Option shortcut
16
     * @param ?non-empty-string $description Option description
17
     * @param positive-int $mode Option mode, {@see InputOption} constants
18
     * @param \Closure|array $suggestedValues Option suggested values
19
     */
20
    public function __construct(
21
        public readonly ?string $name = null,
22
        public readonly string|array|null $shortcut = null,
23
        public readonly ?string $description = null,
24
        public readonly int $mode = InputOption::VALUE_NONE,
25
        public readonly \Closure|array $suggestedValues = []
26
    ) {
27
    }
28
}
29