LogoVote   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A logo() 0 4 1
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Models;
9
10
use Illuminate\Database\Eloquent\Model;
11
12
/**
13
 * Class LogoVote.
14
 *
15
 * @property int $id
16
 * @property int $logo_id
17
 * @property int $user_id
18
 * @property int $up
19
 * @property int $down
20
 * @property string $deleted_at
21
 * @property \Carbon\Carbon $created_at
22
 * @property \Carbon\Carbon $updated_at
23
 * @property-read \App\Models\User $user
24
 * @property-read \App\Models\Logo $logo
25
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereId($value)
26
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereLogoId($value)
27
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereUserId($value)
28
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereUp($value)
29
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereDown($value)
30
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereDeletedAt($value)
31
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereCreatedAt($value)
32
 * @method static \Illuminate\Database\Query\Builder|\App\Models\LogoVote whereUpdatedAt($value)
33
 * @mixin \Eloquent
34
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
35
 */
36
class LogoVote extends Model
37
{
38
    use \Venturecraft\Revisionable\RevisionableTrait;
39
    protected $table = 'logo_votes';
40
41
    public $timestamps = true;
42
43
    protected $fillable = [
44
        'logo_id',
45
        'user_id',
46
        'up',
47
        'down',
48
    ];
49
50
    protected $guarded = [];
51
52
    public function user()
53
    {
54
        return $this->hasOne('App\Models\User');
55
    }
56
57
    public function logo()
58
    {
59
        return $this->hasOne('App\Models\Logo');
60
    }
61
}
62