Completed
Push — development ( c9c0c4...9737c9 )
by Claudio
04:01 queued 01:32
created

RoomItem::store()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Models;
4
5
use Sofa\Eloquence\Metable\InvalidMutatorException;
6
7
/**
8
 * Class RoomItem.
9
 */
10
class RoomItem extends ChocolateyModel
11
{
12
    /**
13
     * Disable Timestamps.
14
     *
15
     * @var bool
16
     */
17
    public $timestamps = false;
18
19
    /**
20
     * The table associated with the model.
21
     *
22
     * @var string
23
     */
24
    protected $table = 'items';
25
26
    /**
27
     * Primary Key of the Table.
28
     *
29
     * @var string
30
     */
31
    protected $primaryKey = 'id';
32
33
    /**
34
     * Store Function.
35
     *
36
     * An RoomItem can't be inserted by the CMS.
37
     * Only by the Emulator
38
     */
39
    public function store()
40
    {
41
        throw new InvalidMutatorException('You cannot store an RoomItem Chocolatey. RoomItems are created by the Emulator.');
42
    }
43
}
44