Passed
Push — master ( a8d0c9...8a0571 )
by Aleksei
07:15 queued 22s
created

LoggerChannel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 0
dl 0
loc 2
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Logger\Attribute;
6
7
use Psr\Log\LoggerInterface;
8
9
/**
10
 * Used to specify the channel name for the logger when it injected as {@see LoggerInterface} on auto-wiring.
11
 *
12
 * Note: {@see \Spiral\Logger\LoggerInjector} should be registered in the container to support this attribute.
13
 */
14
#[\Attribute(\Attribute::TARGET_PARAMETER)]
15
final class LoggerChannel
16
{
17
    /**
18
     * @param non-empty-string $name
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...
19
     */
20 2
    public function __construct(public readonly string $name)
21
    {
22 2
    }
23
}
24