Test Failed
Pull Request — master (#93)
by Alexander
05:13 queued 02:34
created

Middleware::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
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