Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
RouteNotFound | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOrigins | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php declare(strict_types=1); |
2 | /* |
3 | * This file is part of Aplus Framework Routing Library. |
4 | * |
5 | * (c) Natan Felles <natanfelles@gmail.com> |
6 | * |
7 | * For the full copyright and license information, please view the LICENSE |
8 | * file that was distributed with this source code. |
9 | */ |
10 | namespace Framework\Routing\Attributes; |
11 | |
12 | use Attribute; |
13 | |
14 | /** |
15 | * Class RouteNotFound. |
16 | * |
17 | * @package routing |
18 | */ |
19 | #[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] |
20 | class RouteNotFound |
21 | { |
22 | /** |
23 | * @var array<string> |
24 | */ |
25 | protected array $origins; |
26 | |
27 | /** |
28 | * RouteNotFound constructor. |
29 | * |
30 | * @param array<string>|string $origins The Route Not Found origins |
31 | */ |
32 | public function __construct(array | string $origins = []) |
33 | { |
34 | $this->origins = (array) $origins; |
35 | } |
36 | |
37 | /** |
38 | * @return array<string> |
39 | */ |
40 | public function getOrigins() : array |
41 | { |
42 | return $this->origins; |
43 | } |
44 | } |