Round   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A series() 0 2 1
A schedule() 0 3 1
A matches() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Round extends Model
8
{
9
10
    protected $fillable = array('name', 'start_date', 'end_date', 'association_id', 'series_id', 'division_id', 'schedule_id', 'scores_closed');
11
12
    /**
13
     * The attributes that should be mutated to dates.
14
     *
15
     * @var array
16
     */
17
    protected $dates = [
18
        'start_date',
19
        'end_date',
20
    ];
21
22
    // Round belongs to a series:
23
    public function series() {
24
        return $this->belongsTo('App\Series');
25
    }
26
27
    public function schedule()
28
    {
29
        return $this->belongsTo('App\Schedule');
30
    }
31
32
    public function matches() {
33
        return $this->hasMany('App\PLMatch')
34
            ->whereNotNull('home_team_id');
35
    }
36
37
}
38