Issues (17)

src/LaravelDataTablesServiceProvider.php (3 issues)

Labels
Severity
1
<?php
2
3
namespace Laravel\DataTables;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class LaravelDataTablesServiceProvider extends ServiceProvider
8
{
9
    //TODO: ask the user for the preset (react/vue/angular)
10
    public function register()
11
    {
12
        if ($this->app->runningInConsole()) {
0 ignored issues
show
The method runningInConsole() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

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

12
        if ($this->app->/** @scrutinizer ignore-call */ runningInConsole()) {

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...
13
            $this->registerConsoleCommands();
14
        }
15
16
        $this->registerPublishables();
17
    }
18
19
    public function registerPublishables()
20
    {
21
        $publishablePath = __DIR__.'/publishable';
22
        $this->publishes([
0 ignored issues
show
The method publishes() does not exist on Laravel\DataTables\Larav...taTablesServiceProvider. ( Ignorable by Annotation )

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

22
        $this->/** @scrutinizer ignore-call */ 
23
               publishes([

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...
23
            $publishablePath.'/js' => resource_path('js/laravel-datatables/components'),
24
        ], 'datatable');
25
    }
26
27
    protected function registerConsoleCommands()
28
    {
29
        $this->commands(\Laravel\DataTables\Commands\RegisterServiceDataTableCommand::class);
0 ignored issues
show
The method commands() does not exist on Laravel\DataTables\Larav...taTablesServiceProvider. ( Ignorable by Annotation )

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

29
        $this->/** @scrutinizer ignore-call */ 
30
               commands(\Laravel\DataTables\Commands\RegisterServiceDataTableCommand::class);

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...
30
    }
31
}
32