RouterProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 20
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRoutes() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Providers;
6
7
use Canvas\Providers\RouterProvider as CanvasRouterProvider;
8
use function Canvas\Core\appPath;
9
use Phalcon\Di;
10
11
class RouterProvider extends CanvasRouterProvider
12
{
13
    /**
14
     * Returns the array for all the routes on this system.
15
     *
16
     * @return array
17 76
     */
18
    protected function getRoutes(): array
19 76
    {
20 76
        $path = appPath('api/routes');
21
22
        //app routes
23
        $routes = [
24 76
            'canvas' => Di::getDefault()->getConfig()->application->core->path . '/routes/api.php',
25 76
            'api' => $path . '/api.php',
26
        ];
27
28 76
        return $routes;
29
    }
30
}
31