Test Failed
Push — master ( 646e1f...19314b )
by Gabriel
02:47
created

MoneyServiceProvider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A provides() 0 6 1
A registerCurrency() 0 3 1
A register() 0 4 1
A registerCurrencies() 0 4 1
1
<?php
2
3
namespace ByTIC\Money;
4
5
use ByTIC\Assets\Encore\EntrypointLookupFactory;
6
use ByTIC\Assets\Encore\EntrypointsCollection;
7
use Money\Currencies\ISOCurrencies;
8
use Nip\Container\ServiceProviders\Providers\AbstractSignatureServiceProvider;
9
use Symfony\Component\Asset\Package;
10
use Symfony\Component\Asset\Packages;
11
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
12
use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupCollection;
13
use Symfony\WebpackEncoreBundle\Asset\TagRenderer;
14
15
/**
16
 * Class MoneyServiceProvider
17
 * @package ByTIC\Money
18
 */
19
class MoneyServiceProvider extends AbstractSignatureServiceProvider
20
{
21
    /**
22
     * @inheritDoc
23
     */
24
    public function provides()
25
    {
26
        return [
27
            'money.currencies',
28
            'money.currency',
29
            'money.formatter',
30
        ];
31
    }
32
33
    public function register()
34
    {
35
        $this->registerCurrencies();
36
        $this->registerCurrency();
37
    }
38
39
    protected function registerCurrencies()
40
    {
41
        $this->getContainer()->share('money.currencies', function () {
42
            return new ISOCurrencies();
43
        });
44
    }
45
46
    protected function registerCurrency()
47
    {
48
        $this->getContainer()->share('money.currency', function () {
49
        });
50
    }
51
}
52