Completed
Push — development ( 2fad51...a387f8 )
by Claudio
02:44
created

PaymentCategory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A store() 0 6 1
1
<?php
2
3
namespace App\Models;
4
5
/**
6
 * Class PaymentCategory
7
 * @package App\Models
8
 */
9
class PaymentCategory extends ChocolateyModel
10
{
11
    /**
12
     * Disable Timestamps
13
     *
14
     * @var bool
15
     */
16
    public $timestamps = false;
17
18
    /**
19
     * The table associated with the model.
20
     *
21
     * @var string
22
     */
23
    protected $table = 'chocolatey_shop_payment_categories';
24
25
    /**
26
     * Primary Key of the Table
27
     *
28
     * @var string
29
     */
30
    protected $primaryKey = 'id';
31
32
    /**
33
     * Store an Shop Country
34
     * @param string $paymentName
35
     * @return PaymentCategory
36
     */
37
    public function store(string $paymentName): PaymentCategory
38
    {
39
        $this->attributes['payment_type'] = $paymentName;
40
41
        return $this;
42
    }
43
}
44