ParsedAttribute   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A attribute() 0 3 1
A __construct() 0 4 1
A target() 0 3 1
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