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

RouterProvider::getRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 12
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 1
nc 1
nop 0
crap 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