GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

PageTitleServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Rephlux\PageTitle;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class PageTitleServiceProvider.
9
 *
10
 * @author Chris van Daele <[email protected]>
11
 */
12
class PageTitleServiceProvider extends ServiceProvider
13
{
14
    /**
15
     * Indicates if loading of the provider is deferred.
16
     *
17
     * @var bool
18
     */
19
    protected $defer = false;
20
21
    /**
22
     * Register the service provider.
23
     */
24
    public function register()
25
    {
26
        $this->app->singleton('PageTitle', function () {
27
            $delimeter = config('pagetitle.delimiter');
28
            $page_name = config('pagetitle.page_name');
29
            $default   = config('pagetitle.default_title_when_empty');
30
31
            return new PageTitle($delimeter, $page_name, $default);
32
        });
33
    }
34
35
    public function boot()
36
    {
37
        $configPath = __DIR__.'/../config/config.php';
38
39
        $this->mergeConfigFrom($configPath, 'pagetitle');
40
        $this->publishes([$configPath => config_path('pagetitle.php')], 'config');
41
    }
42
43
    /**
44
     * Get the services provided by the provider.
45
     *
46
     * @return array
47
     */
48
    public function provides()
49
    {
50
        return ['PageTitle'];
51
    }
52
}
53