Route::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 3
dl 0
loc 2
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Utilities\Router\Attributes;
5
6
/**
7
 * Route class
8
 *
9
 * @link    https://github.com/utilities-php/router
10
 * @author  Shahrad Elahi (https://github.com/shahradelahi)
11
 * @license https://github.com/utilities-php/router/blob/master/LICENSE (MIT License)
12
 */
13
#[\Attribute(\Attribute::TARGET_METHOD)]
14
class Route
15
{
16
17
    public function __construct(protected string $method, protected string $uri, protected bool $secure = false)
18
    {
19
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getMethod(): string
26
    {
27
        return $this->method;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getUri(): string
34
    {
35
        return $this->uri;
36
    }
37
38
    /**
39
     * @return bool
40
     */
41
    public function isSecure(): bool
42
    {
43
        return $this->secure;
44
    }
45
46
}