Passed
Pull Request — main (#20)
by Chema
12:14 queued 10:21
created

Inject   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 9
ccs 1
cts 1
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Container\Attribute;
6
7
use Attribute;
8
9
/**
10
 * Marks a constructor parameter for dependency injection.
11
 * Optionally specifies which concrete implementation to inject.
12
 */
13
#[Attribute(Attribute::TARGET_PARAMETER)]
14
final class Inject
15
{
16
    /**
17
     * @param class-string|null $implementation The specific implementation to inject
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string|null at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string|null.
Loading history...
18
     */
19 3
    public function __construct(
20
        public ?string $implementation = null,
21
    ) {
22 3
    }
23
}
24