Test Failed
Push — master ( 7fb687...840826 )
by Gabriel
12:03
created

src/MoneyServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace ByTIC\Money;
4
5
use ByTIC\Assets\Encore\EntrypointLookupFactory;
6
use ByTIC\Assets\Encore\EntrypointsCollection;
7
use ByTIC\Money\Formatter\Manager;
8
use Money\Currencies\ISOCurrencies;
9
use Nip\Container\ServiceProviders\Providers\AbstractSignatureServiceProvider;
0 ignored issues
show
The type Nip\Container\ServicePro...ignatureServiceProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Symfony\Component\Asset\Package;
11
use Symfony\Component\Asset\Packages;
12
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
13
use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupCollection;
14
use Symfony\WebpackEncoreBundle\Asset\TagRenderer;
15
16
/**
17
 * Class MoneyServiceProvider
18
 * @package ByTIC\Money
19
 */
20
class MoneyServiceProvider extends AbstractSignatureServiceProvider
21
{
22
    /**
23
     * @inheritDoc
24
     */
25
    public function provides()
26
    {
27
        return [
28
            'money.currencies',
29
            'money.currency',
30
            'money.formatter',
31
        ];
32
    }
33
34
    public function register()
35
    {
36
        $this->registerCurrencies();
37
        $this->registerCurrency();
38
        $this->registerFormatter();
39
    }
40
41
    protected function registerCurrencies()
42
    {
43
        $this->getContainer()->share('money.currencies', function () {
44
            return new ISOCurrencies();
45
        });
46
    }
47
48
    protected function registerCurrency()
49
    {
50
        $this->getContainer()->share('money.currency', function () {
51
        });
52
    }
53
54
    protected function registerFormatter()
55
    {
56
        $this->getContainer()->share('money.formatter', function () {
57
            return Manager::instance();
58
        });
59
    }
60
}
61