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

DefinesPivotColumns   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 5
eloc 6
c 3
b 0
f 1
dl 0
loc 40
ccs 10
cts 10
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRedeemedAtColumn() 0 3 1
A getRedeemedTypeColumn() 0 3 1
A getRedeemedIdColumn() 0 3 1
A getCreatedAtColumn() 0 3 1
A getUpdatedAtColumn() 0 3 1
1
<?php
2
3
namespace MichaelRubel\Couponables\Models\Traits;
4
5
trait DefinesPivotColumns
6
{
7
    /**
8
     * @return string
9
     */
10 19
    public function getRedeemedAtColumn(): string
11
    {
12 19
        return 'redeemed_at';
13
    }
14
15
    /**
16
     * @return string
17
     */
18 19
    public function getRedeemedTypeColumn(): string
19
    {
20 19
        return 'redeemed_type';
21
    }
22
23
    /**
24
     * @return string
25
     */
26 19
    public function getRedeemedIdColumn(): string
27
    {
28 19
        return 'redeemed_id';
29
    }
30
31
    /**
32
     * @return string
33
     */
34 19
    public function getCreatedAtColumn(): string
35
    {
36 19
        return 'created_at';
37
    }
38
39
    /**
40
     * @return string
41
     */
42 2
    public function getUpdatedAtColumn(): string
43
    {
44 2
        return 'updated_at';
45
    }
46
}
47