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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 41
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 7 1
A provides() 0 4 1
A register() 0 10 1
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