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

Test Setup Failed
Pull Request — development (#68)
by José
06:06
created

UuidTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
1
<?php
2
3
namespace GiveBlood\Traits;
4
5
use Ramsey\Uuid\Uuid;
6
/**
7
 * Auto generate a uuid to the given model.
8
*/
9
trait UuidTrait
10
{
11
    protected static function boot()
12
    {
13
        parent::boot();
14
15
        static::creating(
16
            function ($model) {
17
                $model->{$model->getKeyName()} = Uuid::uuid4()->toString();
18
            }
19
        );
20
    }
21
}
22