ParsedAttribute::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace BrenoRoosevelt\PhpAttributes;
5
6
use ReflectionAttribute;
7
use ReflectionClass;
8
use ReflectionClassConstant;
9
use ReflectionMethod;
10
use ReflectionParameter;
11
use ReflectionProperty;
12
13
// @codingStandardsIgnoreFile
14
final class ParsedAttribute
15
{
16
    public function __construct(
17
        private ReflectionAttribute $attribute,
18
        private ReflectionClass|ReflectionClassConstant|ReflectionProperty|ReflectionMethod|ReflectionParameter $target
19
    ) {
20
    }
21
22
    public function attribute(): ReflectionAttribute
23
    {
24
        return $this->attribute;
25
    }
26
27
    public function target(): ReflectionClassConstant|ReflectionParameter|ReflectionMethod|ReflectionClass|ReflectionProperty
28
    {
29
        return $this->target;
30
    }
31
}
32