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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 77.78%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 26
ccs 7
cts 9
cp 0.7778
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 13 2
A register() 0 3 1
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