Passed
Push — main ( 8c1e04...bb028d )
by Michael
03:23
created

DefinesColumns   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 3
Metric Value
wmc 11
eloc 12
c 5
b 0
f 3
dl 0
loc 88
ccs 22
cts 22
cp 1
rs 10

11 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 getRedeemerIdColumn() 0 3 1
A getQuantityColumn() 0 3 1
A getRedeemerTypeColumn() 0 3 1
A getDataColumn() 0 3 1
A getCreatedAtColumn() 0 3 1
A getUpdatedAtColumn() 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 32
    public function getCodeColumn(): string
13
    {
14 32
        return 'code';
15
    }
16
17
    /**
18
     * @return string
19
     */
20 3
    public function getTypeColumn(): string
21
    {
22 3
        return 'type';
23
    }
24
25
    /**
26
     * @return string
27
     */
28 2
    public function getValueColumn(): string
29
    {
30 2
        return 'value';
31
    }
32
33
    /**
34
     * @return string
35
     */
36 23
    public function getQuantityColumn(): string
37
    {
38 23
        return 'quantity';
39
    }
40
41
    /**
42
     * @return string
43
     */
44 23
    public function getLimitColumn(): string
45
    {
46 23
        return 'limit';
47
    }
48
49
    /**
50
     * @return string
51
     */
52 26
    public function getExpiresAtColumn(): string
53
    {
54 26
        return 'expires_at';
55
    }
56
57
    /**
58
     * @return string
59
     */
60 24
    public function getRedeemerTypeColumn(): string
61
    {
62 24
        return 'redeemer_type';
63
    }
64
65
    /**
66
     * @return string
67
     */
68 6
    public function getRedeemerIdColumn(): string
69
    {
70 6
        return 'redeemer_id';
71
    }
72
73
    /**
74
     * @return string
75
     */
76 1
    public function getDataColumn(): string
77
    {
78 1
        return 'data';
79
    }
80
81
    /**
82
     * @return string
83
     */
84 38
    public function getCreatedAtColumn(): string
85
    {
86 38
        return 'created_at';
87
    }
88
89
    /**
90
     * @return string
91
     */
92 38
    public function getUpdatedAtColumn(): string
93
    {
94 38
        return 'updated_at';
95
    }
96
}
97