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.

FractalServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
ccs 8
cts 8
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Providers;
4
5
use App\Serializers\DataSerializer;
6
use Illuminate\Support\ServiceProvider;
7
use League\Fractal\Manager;
8
use Spatie\Fractal\Fractal;
9
10
class FractalServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Register the application services.
14
     */
15
    public function register()
16
    {
17 90
        $this->app->bind('fractal', function () {
18
19 7
            $manager = new Manager();
20
21 7
            $fractal = new Fractal($manager);
22 7
            $fractal->serializeWith(new DataSerializer);
23 7
            $fractal->parseIncludes(request('include', []));
24
25 7
            return $fractal;
26 90
        });
27 90
    }
28
}
29