1 | <?php namespace Arcanedev\RouteViewer; |
||
13 | class RouteViewer implements RouteViewerContract |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** |
||
20 | * The router instance. |
||
21 | * |
||
22 | * @var \Illuminate\Routing\Router |
||
23 | */ |
||
24 | private $router; |
||
25 | |||
26 | /** |
||
27 | * The config repository. |
||
28 | * |
||
29 | * @var \Illuminate\Contracts\Config\Repository |
||
30 | */ |
||
31 | private $config; |
||
32 | |||
33 | /** |
||
34 | * The route collection. |
||
35 | * |
||
36 | * @var \Arcanedev\RouteViewer\Entities\RouteCollection |
||
37 | */ |
||
38 | protected $routes; |
||
39 | |||
40 | /* ------------------------------------------------------------------------------------------------ |
||
41 | | Constructor |
||
42 | | ------------------------------------------------------------------------------------------------ |
||
43 | */ |
||
44 | /** |
||
45 | * RouteViewer constructor. |
||
46 | * |
||
47 | * @param \Illuminate\Contracts\Routing\Registrar $router |
||
48 | * @param \Illuminate\Contracts\Config\Repository $config |
||
49 | */ |
||
50 | 27 | public function __construct(Router $router, Config $config) |
|
55 | |||
56 | /* ------------------------------------------------------------------------------------------------ |
||
57 | | Main Functions |
||
58 | | ------------------------------------------------------------------------------------------------ |
||
59 | */ |
||
60 | /** |
||
61 | * Get all routes. |
||
62 | * |
||
63 | * @return \Arcanedev\RouteViewer\Entities\RouteCollection |
||
64 | */ |
||
65 | 18 | public function all() |
|
78 | |||
79 | /** |
||
80 | * Get the excluded URIs. |
||
81 | * |
||
82 | * @return array |
||
83 | */ |
||
84 | 18 | public function getExcludedUris() |
|
88 | |||
89 | /** |
||
90 | * Get the excluded methods. |
||
91 | * |
||
92 | * @return array |
||
93 | */ |
||
94 | 18 | public function getExcludedMethods() |
|
98 | |||
99 | /** |
||
100 | * Get method colors. |
||
101 | * |
||
102 | * @return array |
||
103 | */ |
||
104 | 18 | private function getMethodColors() |
|
115 | |||
116 | /* ------------------------------------------------------------------------------------------------ |
||
117 | | Other Functions |
||
118 | | ------------------------------------------------------------------------------------------------ |
||
119 | */ |
||
120 | /** |
||
121 | * Get a config value. |
||
122 | * |
||
123 | * @param string $key |
||
124 | * @param mixed|null $default |
||
125 | * |
||
126 | * @return mixed |
||
127 | */ |
||
128 | 18 | private function getConfig($key, $default = null) |
|
132 | } |
||
133 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..