Completed
Push — master ( cb49ac...f14b58 )
by claudio
13:10
created

Timeslot   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 24
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A Calendar() 0 4 1
1
<?php
2
3
namespace plunner;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class Timeslot
9
 *
10
 * @package plunner
11
 * @author Claudio Cardinale <[email protected]>
12
 * @copyright 2015 Claudio Cardinale
13
 * @version 1.0.0
14
 * @property integer $id
15
 * @property string $time_start
16
 * @property string $time_end
17
 * @property integer $calendar_id
18
 * @property \Carbon\Carbon $created_at
19
 * @property \Carbon\Carbon $updated_at
20
 * @property-read \plunner\Calendar $employees
21
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereId($value)
22
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereTimeStart($value)
23
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereTimeEnd($value)
24
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereCalendarId($value)
25
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereCreatedAt($value)
26
 * @method static \Illuminate\Database\Query\Builder|\plunner\Timeslot whereUpdatedAt($value)
27
 * @property-read \plunner\Calendar $Calendar
28
 */
29
class Timeslot extends Model
30
{
31
    /**
32
     * The attributes that are mass assignable.
33
     *
34
     * @var array
35
     */
36
    protected $fillable = ['time_start', 'time_end'];
37
38
    /**
39
     * The attributes excluded from the model's JSON form.
40
     *
41
     * @var array
42
     */
43
    protected $hidden = ['pivot', 'calendar'];
44
45
    /**
46
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
47
     */
48 8
    public function Calendar()
49
    {
50 8
        return $this->belongsTo('plunner\Calendar');
51
    }
52
}
53