Test Failed
Push — master ( ff1e94...12fe3f )
by Gabriel
15:20
created

PackageConfig::defaultCurrency()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace ByTIC\Money\Utility;
5
6
use ByTIC\Money\MoneyServiceProvider;
7
use Exception;
8
use Nip\Utility\Traits\SingletonTrait;
9
10
/**
11
 *
12
 */
13
class PackageConfig extends \ByTIC\PackageBase\Utility\PackageConfig
14
{
15
    use SingletonTrait;
16
17
    protected $name = MoneyServiceProvider::NAME;
18
19
    public static function configPath(): string
20
    {
21
        return __DIR__ . '/../../config/money.php';
22
    }
23
24
    /**
25
     * @return string|null
26
     * @throws Exception
27
     */
28
    public static function defaultCurrency($default = null): ?string
29
    {
30
        return (string)static::instance()->get('money.defaultCurrency', $default);
31
    }
32
}
33