Series::activeVenues()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Series extends Model
8
{
9
10
    protected $fillable = array('user_id', 'association_id', 'name', 'start_date', 'end_date');
11
12
    // Series relates to an association:
13
    public function association() {
14
        return $this->belongsTo('App\Association');
15
    }
16
17
    public function schedules() {
18
        return $this->hasMany('App\Schedule');
19
    }
20
21
    public function activeVenues() {
22
        // FIXME: instead, relate venues to this series through a mapping table:
23
        return $this->association->venues;
24
    }
25
26
}
27