Passed
Pull Request — main (#1)
by Michael
18:55 queued 15:42
created

ConfiguresCashier   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setCashierCurrencyAs() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MichaelRubel\StripeIntegration\Behaviors;
6
7
use Money\Currency;
8
9
trait ConfiguresCashier
10
{
11
    /**
12
     * Set the Cashier currency.
13
     *
14
     * @param  Currency  $currency
15
     *
16
     * @return void
17
     */
18 1
    public function setCashierCurrencyAs(Currency $currency): void
19
    {
20 1
        config([
21 1
            'cashier.currency' => $currency->getCode(),
22
        ]);
23
    }
24
}
25