Test Setup Failed
Push — master ( f46e6c...b515a7 )
by Sam
05:53
created

PLMatch::result()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class PLMatch extends Model
8
{
9
10
    protected $fillable = array('name', 'start_date', 'end_date', 'association_id',  'series_id', 'division_id', 'schedule_id', 'round_id', 'venue_id', 'home_team_id', 'away_team_id');
11
12
    public function association() {
13
        return $this->belongsTo('App\Association');
14
    }
15
16
    public function series() {
17
        return $this->belongsTo('App\Series');
18
    }
19
20
    public function division() {
21
        return $this->belongsTo('App\Division');
22
    }
23
24
    public function schedule() {
25
        return $this->belongsTo('App\Schedule');
26
    }
27
28
    public function round() {
29
        return $this->belongsTo('App\Round');
30
    }
31
32
    public function venue() {
33
        return $this->belongsTo('App\Venue');
34
    }
35
36
    public function homeTeam() {
37
        return $this->belongsTo('App\Team', 'home_team_id');
38
    }
39
40
    public function awayTeam() {
41
        return $this->belongsTo('App\Team', 'away_team_id');
42
    }
43
44
    public function result() {
45
        return $this->hasOne('App\Result', 'match_id');
46
    }
47
48
    public function resultSubmissions() {
49
        return $this->hasMany('App\ResultSubmission', 'match_id');
50
    }
51
}
52