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

RoomItem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 34
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A store() 0 4 1
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