Passed
Push — master ( 62919d...1f65fa )
by Iman
04:23
created

CbSettingsServiceProvider::registerModule()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace Crocodicstudio\Crudbooster\Modules\SettingModule;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class CbSettingsServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->app['view']->addNamespace('CbSettings', __DIR__.'/views');
17
        $this->loadRoutesFrom( __DIR__.'/settings_routes.php');
18
        $this->loadMigrationsFrom(__DIR__ . '/migrations');
19
        app('CbDynamicMenus')->addSuperAdminMenu('CbSettings::menu');
0 ignored issues
show
Bug introduced by
The method addSuperAdminMenu() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

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

19
        app('CbDynamicMenus')->/** @scrutinizer ignore-call */ addSuperAdminMenu('CbSettings::menu');

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...
20
        $this->registerModule();
21
    }
22
23
    /**
24
     * Register the application services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
    }
31
32
    private function registerModule()
33
    {
34
        app('CbModulesRegistery')->addModule('settings', (object) [
0 ignored issues
show
Bug introduced by
The method addModule() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

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

34
        app('CbModulesRegistery')->/** @scrutinizer ignore-call */ addModule('settings', (object) [

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...
35
            'name' => trans('crudbooster.settings'),
36
            'icon' => 'fa fa-cog',
37
            'path' => 'settings',
38
            'table_name' => 'cms_settings',
39
            'controller' => 'SettingsController',
40
            'is_protected' => 1,
41
            'is_active' => 1,
42
        ]);
43
    }
44
45
}
46