Issues (8)

src/LocaleServiceProvider.php (1 issue)

1
<?php
2
3
namespace Nip\Locale;
4
5
use Nip\Container\ServiceProvider\AbstractSignatureServiceProvider;
6
7
/**
8
 * Class LocaleServiceProvider
9
 * @package Nip\Mail
10
 */
11
class LocaleServiceProvider extends AbstractSignatureServiceProvider
12
{
13
14
    /**
15
     * @inheritdoc
16
     */
17
    public function register()
18
    {
19
        $this->registerLocale();
20
    }
21
22
    protected function registerLocale()
23
    {
24
        $this->getContainer()->singleton('locale', Locale::class);
0 ignored issues
show
The method singleton() does not exist on Nip\Container\ContainerInterface. It seems like you code against a sub-type of Nip\Container\ContainerInterface such as Nip\Container\Container or Nip\Container\Container. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
        $this->getContainer()->/** @scrutinizer ignore-call */ singleton('locale', Locale::class);
Loading history...
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function provides()
31
    {
32
        return ['locale'];
33
    }
34
}
35