Completed
Push — development ( b7987d...8c0e57 )
by Claudio
05:33
created

Voucher   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
c 0
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 Voucher
9
 * @package App\Models
10
 */
11
class Voucher extends ChocolateyModel
12
{
13
    /**
14
     * Disable Timestamps
15
     *
16
     * @var bool
17
     */
18
    public $timestamps = false;
19
20
    /**
21
     * The table associated with the model.
22
     *
23
     * @var string
24
     */
25
    protected $table = 'vouchers';
26
27
    /**
28
     * Primary Key of the Table
29
     *
30
     * @var string
31
     */
32
    protected $primaryKey = 'id';
33
34
    /**
35
     * Store Function
36
     *
37
     * A Voucher can't be inserted by the CMS.
38
     * Only by the Emulator
39
     */
40
    public function store()
41
    {
42
        throw new InvalidMutatorException("You cannot store a Voucher by Chocolatey. Voucher need be created from the Server.");
43
    }
44
}
45