PackageConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configPath() 0 3 1
A defaultCurrency() 0 3 1
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('defaultCurrency', $default);
31
    }
32
}
33