Passed
Push — main ( df9a67...447794 )
by Michael
03:30
created

DefinesColumns   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 96
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 3
Metric Value
wmc 12
eloc 13
c 5
b 0
f 3
dl 0
loc 96
ccs 24
cts 24
cp 1
rs 10

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getCodeColumn() 0 3 1
A getTypeColumn() 0 3 1
A getValueColumn() 0 3 1
A getLimitColumn() 0 3 1
A getExpiresAtColumn() 0 3 1
A getQuantityColumn() 0 3 1
A getCreatedAtColumn() 0 3 1
A getRedeemerIdColumn() 0 3 1
A getRedeemerTypeColumn() 0 3 1
A getDataColumn() 0 3 1
A getUpdatedAtColumn() 0 3 1
A getIsEnabledColumn() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MichaelRubel\Couponables\Models\Traits;
6
7
trait DefinesColumns
8
{
9
    /**
10
     * @return string
11
     */
12 45
    public function getCodeColumn(): string
13
    {
14 45
        return 'code';
15
    }
16
17
    /**
18
     * @return string
19
     */
20 15
    public function getTypeColumn(): string
21
    {
22 15
        return 'type';
23
    }
24
25
    /**
26
     * @return string
27
     */
28 14
    public function getValueColumn(): string
29
    {
30 14
        return 'value';
31
    }
32
33
    /**
34
     * @return string
35
     */
36 30
    public function getQuantityColumn(): string
37
    {
38 30
        return 'quantity';
39
    }
40
41
    /**
42
     * @return string
43
     */
44 30
    public function getLimitColumn(): string
45
    {
46 30
        return 'limit';
47
    }
48
49
    /**
50
     * @return string
51
     */
52 34
    public function getExpiresAtColumn(): string
53
    {
54 34
        return 'expires_at';
55
    }
56
57
    /**
58
     * @return string
59
     */
60 35
    public function getIsEnabledColumn(): string
61
    {
62 35
        return 'is_enabled';
63
    }
64
65
    /**
66
     * @return string
67
     */
68 32
    public function getRedeemerTypeColumn(): string
69
    {
70 32
        return 'redeemer_type';
71
    }
72
73
    /**
74
     * @return string
75
     */
76 9
    public function getRedeemerIdColumn(): string
77
    {
78 9
        return 'redeemer_id';
79
    }
80
81
    /**
82
     * @return string
83
     */
84 1
    public function getDataColumn(): string
85
    {
86 1
        return 'data';
87
    }
88
89
    /**
90
     * @return string
91
     */
92 65
    public function getCreatedAtColumn(): string
93
    {
94 65
        return 'created_at';
95
    }
96
97
    /**
98
     * @return string
99
     */
100 65
    public function getUpdatedAtColumn(): string
101
    {
102 65
        return 'updated_at';
103
    }
104
}
105