Passed
Pull Request — master (#1190)
by Aleksei
13:53
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
/**
8
 * @internal
9
 */
10
abstract class AbstractMethod
11
{
12
    /**
13
     * @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...
14
     */
15 12
    public function __construct(
16
        /**
17
         * Alias for the method.
18
         * If not provided, the return type of the method will be used as the alias.
19
         */
20
        public readonly ?string $alias = null,
21
        /**
22
         * Add aliases from the return type of the method even if the method has an alias.
23
         */
24
        public readonly bool $aliasesFromReturnType = false,
25 12
    ) {}
26
}
27