Passed
Push — main ( 724a5a...47e974 )
by Chema
06:46 queued 02:34
created

DocBlockResolvable::className()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Framework\ServiceResolver;
6
7
final class DocBlockResolvable
8
{
9
    /** @var class-string */
10
    private readonly string $className;
11
12
    /**
13
     * @param class-string $className
14
     */
15
    public function __construct(
16
        string $className,
17
        private readonly string $resolvableType,
18
    ) {
19
        /** @psalm-suppress PropertyTypeCoercion */
20
        $this->className = '\\' . ltrim($className, '\\'); // @phpstan-ignore-line
0 ignored issues
show
Bug introduced by
The property className is declared read-only in Gacela\Framework\Service...lver\DocBlockResolvable.
Loading history...
21
    }
22
23
    /**
24
     * @return class-string
25
     */
26
    public function className(): string
27
    {
28
        return $this->className;
29
    }
30
31
    public function resolvableType(): string
32
    {
33
        return $this->resolvableType;
34
    }
35
}
36