Route   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getParameters() 0 3 1
A getControllerClass() 0 3 1
A getArguments() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of the Cervo package.
5
 *
6
 * Copyright (c) 2010-2019 Nevraxe inc. & Marc André Audet <[email protected]>.
7
 *
8
 * @package   Cervo
9
 * @author    Marc André Audet <[email protected]>
10
 * @copyright 2010 - 2019 Nevraxe inc. & Marc André Audet
11
 * @license   See LICENSE.md  MIT
12
 * @link      https://github.com/Nevraxe/Cervo
13
 * @since     5.0.0
14
 */
15
16
declare(strict_types=1);
17
18
namespace Cervo;
19
20
/**
21
 * Route for Cervo.
22
 *
23
 * @author Marc André Audet <[email protected]>
24
 */
25
class Route
26
{
27
    /** @var string The controller class */
28
    private $controllerClass;
29
30
    /** @var array The parameters to pass */
31
    private $parameters = [];
32
33
    /** @var array The arguments to pass */
34
    private $arguments = [];
35
36
    public function __construct(string $controllerClass, array $parameters = [], array $arguments = [])
37
    {
38
        $this->controllerClass = $controllerClass;
39
        $this->parameters = $parameters;
40
        $this->arguments = $arguments;
41
    }
42
43
    public function getControllerClass(): string
44
    {
45
        return $this->controllerClass;
46
    }
47
48
    public function getParameters(): array
49
    {
50
        return $this->parameters;
51
    }
52
53
    public function getArguments(): array
54
    {
55
        return $this->arguments;
56
    }
57
}
58