SsoServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 9
c 3
b 0
f 0
dl 0
loc 18
ccs 6
cts 6
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 11 1
1
<?php
2
3
namespace Spinen\Discourse;
4
5
use Illuminate\Contracts\Routing\Registrar as Router;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class SsoServiceProvider
10
 *
11
 * @package Spinen\Discourse
12
 */
13
class SsoServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Perform post-registration booting of services.
17
     *
18
     * @return void
19
     */
20 1
    public function boot()
21
    {
22 1
        $this->app['router']->group(
23 1
            ['middleware' => $this->app['config']->get('services.discourse.middleware', ['web', 'auth'])],
24
            function (Router $router) {
25 1
                $router->get(
26 1
                    $this->app['config']->get('services.discourse.route'),
27
                    [
28 1
                        'as'   => 'sso.login',
29
                        'domain' => $this->app['config']->get('services.discourse.domain', null),
30
                        'uses' => 'Spinen\Discourse\Controllers\SsoController@login',
31
                    ]
32 1
                );
33
            }
34 1
        );
35
    }
36
}
37