Completed
Push — master ( bc8cc8...6e347a )
by Dmitry
04:49
created

PurchaseResultTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A resetPurchaseResults() 0 6 1
A getErrorPurchaseExceptions() 0 4 1
A getSuccessPurchases() 0 4 1
A getPendingPurchaseExceptions() 0 4 1
1
<?php
2
3
namespace hipanel\modules\finance\cart;
4
5
/**
6
 * Trait PurchaseResultTrait
7
 */
8
trait PurchaseResultTrait
9
{
10
    protected $success = [];
11
12
    protected $error = [];
13
14
    protected $pending = [];
15
16
    protected function resetPurchaseResults()
17
    {
18
        $this->success = [];
19
        $this->error = [];
20
        $this->pending = [];
21
    }
22
23
    public function getErrorPurchaseExceptions()
24
    {
25
        return $this->error;
26
    }
27
28
    public function getSuccessPurchases()
29
    {
30
        return $this->success;
31
    }
32
33
    public function getPendingPurchaseExceptions()
34
    {
35
        return $this->pending;
36
    }
37
}
38