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

SsoServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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