Code Duplication    Length = 16-17 lines in 2 locations

src/Models/Shift.php 1 location

@@ 12-28 (lines=17) @@
9
 * Class Shift
10
 * @package Scool\Timetables\Models
11
 */
12
class Shift extends Model
13
{
14
    use Nameable;
15
16
    protected $fillable = [
17
        'torn', 'name',
18
    ];
19
20
    //TODO falta la relació completa Traits
21
    /**
22
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
23
     */
24
    public function timeslots()
25
    {
26
        return $this->belongsToMany(Timeslot::class);
27
    }
28
}
29

src/Models/Timeslot.php 1 location

@@ 13-28 (lines=16) @@
10
 * Class Timeslot
11
 * @package Scool\Timetables\Models
12
 */
13
class Timeslot extends Model
14
{
15
    use Nameable;
16
17
    protected $fillable = [
18
         'name', 'init_hour', 'final_hour'
19
    ];
20
21
    /**
22
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
23
     */
24
    public function shifts()
25
    {
26
        return $this->belongsToMany(Shift::class);
27
    }
28
}
29