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
Push — development ( e2aa6f...cf846e )
by José
02:52
created

Donor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A bloodType() 0 4 1
1
<?php
2
3
namespace DoeSangue\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Donor extends Model
8
{
9
    /**
10
     * The table associated with the model.
11
     *
12
     * @var string
13
     */
14
    protected $table = 'donors';
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $filliable = [
22
        'blood_type_id',
23
        'bio',
24
    ];
25
26
    /**
27
     * The primary key for the model.
28
     *
29
     * @var string
30
     */
31
    protected $primaryKey = 'user_id';
32
33
    /**
34
     * Indicates if the IDs are auto-incrementing.
35
     *
36
     * @var bool
37
     */
38
    public $incrementing = false;
39
40
    /**
41
     * Related
42
     *
43
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
44
     */
45
    public function user()
46
    {
47
        return $this->hasOne(User::class, 'id', 'user_id');
48
    }
49
50
    /**
51
     * Related
52
     *
53
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
54
     */
55
    public function bloodType()
56
    {
57
        return $this->belongsTo(BloodType::class, 'blood_type_id');
58
    }
59
}
60