EventSetting::event()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * rmarchiv.tk
5
 * (c) 2016-2017 by Marcel 'ryg' Hering
6
 */
7
8
namespace App\Models;
9
10
use Illuminate\Database\Eloquent\Model;
11
12
/**
13
 * Class EventSetting.
14
 *
15
 * @property int $id
16
 * @property int $event_id
17
 * @property int $slots
18
 * @property string $reg_start_date
19
 * @property string $reg_end_date
20
 * @property int $reg_allowed
21
 * @property int $reg_price
22
 * @property \Carbon\Carbon $created_at
23
 * @property \Carbon\Carbon $updated_at
24
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereId($value)
25
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereEventId($value)
26
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereSlots($value)
27
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegStartDate($value)
28
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegEndDate($value)
29
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegAllowed($value)
30
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegPrice($value)
31
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereCreatedAt($value)
32
 * @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereUpdatedAt($value)
33
 * @mixin \Eloquent
34
 * @property-read \App\Models\Event $event
35
 * @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory
36
 */
37 View Code Duplication
class EventSetting extends Model
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
38
{
39
    use \Venturecraft\Revisionable\RevisionableTrait;
40
    protected $table = 'event_settings';
41
42
    public $timestamps = true;
43
44
    protected $fillable = [
45
        'event_id',
46
        'slots',
47
        'reg_start_date',
48
        'reg_end_date',
49
        'reg_allowed',
50
        'reg_price',
51
    ];
52
53
    protected $guarded = [];
54
55
    public function event()
56
    {
57
        return $this->hasOne('App\Models\Event', 'id', 'event_id');
58
    }
59
}
60