GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( ea9462...f6a83c )
by Nikhil
10:26
created

Make   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 38.46%

Importance

Changes 4
Bugs 0 Features 3
Metric Value
wmc 5
c 4
b 0
f 3
lcom 1
cbo 2
dl 0
loc 73
ccs 5
cts 13
cp 0.3846
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 11 1
A models() 0 4 1
A racks() 0 4 1
A purchases() 0 4 1
A guitars() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent;
6
7
/**
8
 * App\Make
9
 *
10
 * @property integer $id
11
 * @property string $name
12
 * @property \Carbon\Carbon $deleted_at
13
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Model[] $models
14
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Rack[] $racks
15
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Purchase[] $purchases
16
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Guitar[] $guitars
17
 * @method static \Illuminate\Database\Query\Builder|\App\Make whereId($value)
18
 * @method static \Illuminate\Database\Query\Builder|\App\Make whereName($value)
19
 * @method static \Illuminate\Database\Query\Builder|\App\Make whereDeletedAt($value)
20
 * @mixin \Eloquent
21
 */
22
class Make extends Eloquent\Model
23
{
24
    use Eloquent\SoftDeletes;
25
26
    /**
27
     * We do not want any timestamps.
28
     *
29
     * @var bool
30
     */
31
    public $timestamps = false;
32
    /**
33
     * @var array
34
     */
35
    protected $dates = ['deleted_at'];
36
    /**
37
     * The attributes that are not mass assignable.
38
     *
39
     * @var array
40
     */
41
    protected $guarded = [];
42
43 23
    public static function boot()
44
    {
45 23
        parent::boot();
46
47 23
        static::deleting(function (Make $make) {
48
            $make->models()->delete();
49
            $make->racks()->delete();
50
            $make->purchases()->delete();
51
            $make->guitars()->delete();
52 23
        });
53 23
    }
54
55
    /**
56
     * Models of this make.
57
     *
58
     * @return Eloquent\Relations\HasMany
59
     */
60
    public function models()
61
    {
62
        return $this->hasMany(Model::class);
63
    }
64
65
    /**
66
     * Rack this make is located in.
67
     *
68
     * @return Eloquent\Relations\HasMany
69
     */
70
    public function racks()
71
    {
72
        return $this->hasMany(Rack::class);
73
    }
74
75
    /**
76
     * Purchases of this make.
77
     *
78
     * @return Eloquent\Relations\HasMany
79
     */
80
    public function purchases()
81
    {
82
        return $this->hasMany(Purchase::class);
83
    }
84
85
    /**
86
     * Guitars of this make.
87
     *
88
     * @return Eloquent\Relations\HasMany
89
     */
90
    public function guitars()
91
    {
92
        return $this->hasMany(Guitar::class);
93
    }
94
}
95