Completed
Push — master ( 4306e3...de53c0 )
by Mahmoud
03:52
created

ChargeableTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A charge() 0 4 1
1
<?php
2
3
namespace App\Ship\Features\Payment\Traits;
4
5
use App\Ship\Features\Payment\Proxies\PaymentsProxy;
6
use Illuminate\Support\Facades\App;
7
8
/**
9
 * Class ChargeableTrait.
10
 *
11
 * @author  Mahmoud Zalt <[email protected]>
12
 */
13
trait ChargeableTrait
14
{
15
16
    /**
17
     * @param $amount
18
     * @param $currency
19
     */
20
    public function charge($amount, $currency)
21
    {
22
        return App::make(PaymentsProxy::class)->charge($this, $amount, $currency);
23
    }
24
}
25