Passed
Push — feature/second-release ( e64b84...683aeb )
by Andrea Marco
02:47
created

Annotator::formatUseStatements()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cerbero\LaravelEnum\Services;
6
7
use Cerbero\Enum\Services\Annotator as BaseAnnotator;
8
9
/**
10
 * The enums annotator.
11
 *
12
 * @template TEnum of \UnitEnum
13
 *
14
 * @extends BaseAnnotator<TEnum>
15
 */
16
final class Annotator extends BaseAnnotator
17
{
18
    /**
19
     * Instantiate the class.
20
     *
21
     * @param class-string<TEnum> $enum
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<TEnum> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<TEnum>.
Loading history...
22
     * @throws \InvalidArgumentException
23
     */
24 2
    public function __construct(protected string $enum)
25
    {
26 2
        $this->inspector = new Inspector($enum);
27
    }
28
}
29