Passed
Push — 0.7.0 ( effe46...27db46 )
by Alexander
03:02 queued 11s
created

RouteCompiler::getRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php 
2
3
/**
4
 * Lenevor Framework
5
 *
6
 * LICENSE
7
 *
8
 * This source file is subject to the new BSD license that is bundled
9
 * with this package in the file license.md.
10
 * It is also available through the world-wide-web at this URL:
11
 * https://lenevor.com/license
12
 * If you did not receive a copy of the license and are unable to
13
 * obtain it through the world-wide-web, please send an email
14
 * to [email protected] so we can send you a copy immediately.
15
 *
16
 * @package     Lenevor
17
 * @subpackage  Base
18
 * @link        https://lenevor.com
19
 * @copyright   Copyright (c) 2019 - 2021 Alexander Campo <[email protected]>
20
 * @license     https://opensource.org/licenses/BSD-3-Clause New BSD license or see https://lenevor.com/license or see /license.md
21
 */
22
23
namespace Syscodes\Routing;
24
25
use LogicExcption;
0 ignored issues
show
Bug introduced by
The type LogicExcption was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
26
use DomainException;
27
28
/**
29
 * Allows compile 
30
 * 
31
 * @author Alexander Campo <[email protected]>
32
 */
33
class RouteCompiler
34
{
35
    /**
36
     * The Route implementation.
37
     * 
38
     * @var \Syscodes\Routing\Route $route
39
     */
40
    protected $route;
41
42
    /**
43
     * Constructor. Create a new Route Compiler instance.
44
     * 
45
     * @param  \Syscodes\Routing\Route  $route
46
     * 
47
     * @return void
48
     */
49
    public function __construct(Route $route)
50
    {
51
        $this->route = $route;
52
    }
53
54
    /**
55
     * Get the inner route.
56
     * 
57
     * @return array
58
     */
59
    public function getRoute()
60
    {
61
        return $this->route;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->route returns the type Syscodes\Routing\Route which is incompatible with the documented return type array.
Loading history...
62
    }
63
}