Passed
Pull Request — master (#1190)
by butschster
11:23
created

AbstractMethod::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Boot\Attribute;
6
7
abstract class AbstractMethod
8
{
9
    /**
10
     * @param non-empty-string|null $alias
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-empty-string|null at position 0 could not be parsed: Unknown type name 'non-empty-string' at position 0 in non-empty-string|null.
Loading history...
11
     */
12 12
    public function __construct(
13
        /**
14
         * Alias for the method.
15
         * If not provided, the return type of the method will be used as the alias.
16
         */
17
        public readonly ?string $alias = null,
18
        /**
19
         * Add aliases from the return type of the method even if the method has an alias.
20
         */
21
        public readonly bool $aliasesFromReturnType = false,
22 12
    ) {}
23
}
24