Passed
Push — master ( c6742f...7be0d1 )
by Maximo
06:08 queued 10s
created

RouterProvider::getMiddleware()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
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 73
    protected function getRoutes(): array
18
    {
19 73
        $path = appPath('api/routes');
20 73
        $canvsaPath = getenv('CANVAS_CORE_PATH');
21
22
        //app routes
23
        $routes = [
24 73
            'api' => $path . '/api.php',
25 73
            'canvas' =>  $canvsaPath. '/routes/api.php'
26
        ];
27
28 73
        return $routes;
29
    }
30
}
31