Test Failed
Pull Request — master (#93)
by Dmitriy
02:34
created

Middleware   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDefinition() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Middleware\Dispatcher\Attribute;
6
7
use Attribute;
8
9
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
10
final class Middleware
11
{
12
    private mixed $definition;
13
14
    public function __construct(
15
        array|callable|string $definition
16
    ) {
17
        $this->definition = $definition;
18
    }
19
20
    public function getDefinition(): mixed
21
    {
22
        return $this->definition;
23
    }
24
}
25