Completed
Push — develop ( 45f879...276e72 )
by Stephen
22s queued 13s
created

SsoServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 88.89%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 30
ccs 8
cts 9
cp 0.8889
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
A register() 0 2 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
                        'uses' => 'Spinen\Discourse\Controllers\SsoController@login',
29
                        'as'   => 'sso.login',
30
                    ]
31
                );
32 1
            }
33
        );
34 1
    }
35
36
    /**
37
     * Register the service provider.
38
     *
39
     * @return void
40
     */
41
    public function register()
42
    {
43
        //
44
    }
45
}
46