Completed
Push — master ( b112db...b25060 )
by Vladimir
10:13
created

RouteServiceProvider::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
ccs 6
cts 6
cp 1
crap 1
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Foundation\Providers;
6
7
use Illuminate\Support\Facades\Route;
8
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as BaseRouteServiceProvider;
9
10
class RouteServiceProvider extends BaseRouteServiceProvider
11
{
12
    protected $namespace = 'FondBot\Foundation';
13
14 83
    public function map(): void
15
    {
16 83
        Route::get('/', 'FondBot\Foundation\Controller@index');
17
18 83
        Route::group(['middleware' => 'fondbot.webhook'], function () {
19 83
            Route::get('webhook/{channel}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook');
20 83
            Route::post('webhook/{channel}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook');
21 83
        });
22
    }
23
}
24