Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — development (#61)
by José
15:49
created

AppServiceProvider::boot()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2.0932

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 5
cts 7
cp 0.7143
rs 9.8333
c 0
b 0
f 0
cc 2
nc 1
nop 0
crap 2.0932
1
<?php
2
3
namespace DoeSangue\Providers;
4
5
use DoeSangue\Models\User;
6
use DoeSangue\Observers\UserObserver;
7
use Illuminate\Support\ServiceProvider;
8
use Illuminate\Support\Facades\Validator;
9
10
class AppServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap any application services.
14
     */
15 7
    public function boot()
16
    {
17
        //  User::observe(UserObserver::class);
18
19
        // Extend the Validator class.
20
        // To check the user age (minimum: 16)
21 7
        Validator::extend(
22 7
            'olderThan', function($attributes, $value, $parameters) {
23
                $minAge = (!empty($parameters)) ? (int) $parameters[ 0 ] : 16;
24
                return \Carbon\Carbon::now()->diff(new \Carbon\Carbon($value))->y >= $minAge;
25 7
            }
26
        );
27 7
    }
28
29
    /**
30
     * Register any application services.
31
     */
32 7
    public function register()
33
    {
34 7
    }
35
}
36