ThemeAssetMapServiceProvider::id()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Leonidas\Framework\Theme\Provider\League;
4
5
use Leonidas\Framework\Provider\AssetResourcesProvider;
6
use Leonidas\Framework\Provider\League\Abstracts\AbstractLeagueServiceFactory;
7
use Panamax\Contracts\ServiceFactoryInterface;
8
9
class ThemeAssetMapServiceProvider extends AbstractLeagueServiceFactory
10
{
11
    protected function id(): string
12
    {
13
        return 'theme_assets';
14
    }
15
16
    protected function aliases(): array
17
    {
18
        return ['theme_asset_map'];
19
    }
20
21
    protected function factory(): ServiceFactoryInterface
22
    {
23
        return new AssetResourcesProvider();
24
    }
25
26
    protected function args(): ?array
27
    {
28
        $url = $this->container->get('url');
0 ignored issues
show
Bug introduced by
The method get() does not exist on null. ( Ignorable by Annotation )

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

28
        /** @scrutinizer ignore-call */ 
29
        $url = $this->container->get('url');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
        $config = $this->getConfig('view');
30
31
        return [
32
            'base' => $url . '/' . $config['assets'],
33
            'types' => $config['asset_types'],
34
        ];
35
    }
36
}
37