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 — master (#3490)
by
unknown
16:50
created

CanGenerateUuid   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootCanGenerateUuid() 0 5 2
1
<?php
2
3
namespace Backpack\CRUD\app\Models\Traits;
4
5
use Illuminate\Support\Str;
6
7
/**
8
 * Generates a UUID on model creation accoriding to the public $uuidColumn parameter
9
 */
10
	
11
trait CanGenerateUuid{
12
    protected static function bootCanGenerateUuid()
13
    {
14
        static::creating(function ($model) {
15
            if ($model->uuidColumn != null) {
16
                $model->{$model->uuidColumn} = (string) Str::uuid();
17
            }
18
        });
19
    }
20
21
}