GridViewServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 2
Metric Value
eloc 6
dl 0
loc 19
rs 10
c 3
b 1
f 2
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 2 1
A boot() 0 7 1
1
<?php
2
3
namespace ChurakovMike\EasyGrid;
4
5
use Illuminate\Support\Facades\Blade;
6
use Illuminate\Support\ServiceProvider;
7
8
class GridViewServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Service provider for grid.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'churakovmike_easygrid');
0 ignored issues
show
Bug introduced by
The method loadViewsFrom() does not exist on ChurakovMike\EasyGrid\GridViewServiceProvider. ( Ignorable by Annotation )

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

17
        $this->/** @scrutinizer ignore-call */ 
18
               loadViewsFrom(__DIR__ . '/../resources/views', 'churakovmike_easygrid');

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...
18
        $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'churakovmike_easygrid');
0 ignored issues
show
Bug introduced by
The method loadTranslationsFrom() does not exist on ChurakovMike\EasyGrid\GridViewServiceProvider. ( Ignorable by Annotation )

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

18
        $this->/** @scrutinizer ignore-call */ 
19
               loadTranslationsFrom(__DIR__ . '/../resources/lang', 'churakovmike_easygrid');

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...
19
        require_once __DIR__ . '/functions.php';
20
        Blade::directive('easy_grid', function ($config) {
21
            return "<?php echo grid($config) ?>";
22
        });
23
    }
24
25
    public function register()
26
    {
27
        //
28
    }
29
}
30