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

ChargeableTrait::charge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
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