Passed
Pull Request — main (#1)
by Michael
03:07
created

ConfiguresCashier::setCashierCurrencyAs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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