Test Failed
Pull Request — master (#101)
by Maximo
05:24
created

RouterProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 19
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1

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 function Canvas\Core\appPath;
8
use Canvas\Providers\RouterProvider as CanvasRouterProvider;
9
10
class RouterProvider extends CanvasRouterProvider
11
{
12
    /**
13
     * Returns the array for all the routes on this system.
14
     *
15
     * @return array
16
     */
17
    protected function getRoutes(): array
18
    {
19
        $path = appPath('api/routes');
20
        $canvsaPath = getenv('CANVAS_CORE_PATH');
21
22
        //app routes
23 71
        $routes = [
24
            'api' => $path . '/api.php',
25 71
            'canvas' =>  $canvsaPath. '/routes/api.php'
26
        ];
27 71
28 71
        return $routes;
29
    }
30
}
31