| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] |
||
| 10 | /** |
||
| 11 | * @psalm-immutable |
||
| 12 | */ |
||
| 13 | final class Middleware |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @psalm-readonly |
||
| 17 | * |
||
| 18 | * @var class-string<MiddlewareInterface>[]|string[] |
||
|
|
|||
| 19 | */ |
||
| 20 | public array $list; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param class-string<MiddlewareInterface>[]|string[] $list |
||
| 24 | */ |
||
| 25 | public function __construct(array $list) |
||
| 26 | { |
||
| 27 | $this->list = $list; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return class-string<MiddlewareInterface>[]|string[] |
||
| 32 | */ |
||
| 33 | public function toArray(): array |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param class-string<MiddlewareInterface>[]|string[] $list |
||
| 40 | * |
||
| 41 | * @return Middleware |
||
| 42 | */ |
||
| 43 | public static function fromArray(array $list): Middleware |
||
| 46 | } |
||
| 47 | } |
||
| 48 |