MediaLibraryServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 4
c 2
b 1
f 1
dl 0
loc 21
ccs 0
cts 7
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 3 1
A provides() 0 3 1
1
<?php
2
3
namespace ByTIC\MediaLibrary;
4
5
use ByTIC\MediaLibrary\Loaders\Filesystem;
6
use ByTIC\MediaLibrary\Loaders\LoaderInterface;
7
use Nip\Container\ServiceProviders\Providers\AbstractSignatureServiceProvider;
8
use Nip\Container\ServiceProviders\Providers\BootableServiceProviderInterface;
9
10
/**
11
 * Class MediaLibraryServiceProvider.
12
 */
13
class MediaLibraryServiceProvider extends AbstractSignatureServiceProvider implements BootableServiceProviderInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function register()
19
    {
20
        $this->getContainer()->set(LoaderInterface::class, Filesystem::class);
0 ignored issues
show
Bug introduced by
The method set() does not exist on Nip\Container\ContainerInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Nip\Container\Bridges\BridgeInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

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

20
        $this->getContainer()->/** @scrutinizer ignore-call */ set(LoaderInterface::class, Filesystem::class);
Loading history...
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function provides()
27
    {
28
        return [LoaderInterface::class];
29
    }
30
31
    public function boot()
32
    {
33
        $this->getContainer()->get('migrations.migrator')->path(dirname(__DIR__) . '/migrations/');
34
    }
35
}
36