Kernel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 6
dl 0
loc 34
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A schedule() 0 13 1
1
<?php
2
3
namespace App\Console;
4
5
use App\Satis\ConfigManager;
6
use App\Satis\Context\PublicRepository;
7
use Illuminate\Console\Scheduling\Schedule;
8
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
9
10
class Kernel extends ConsoleKernel
11
{
12
    /**
13
     * The Artisan commands provided by your application.
14
     *
15
     * @var array
16
     */
17
    protected $commands = [
18
        \App\Console\Commands\Inspire::class,
19
        \App\Console\Commands\Permissions::class,
20
        \App\Console\Commands\Persister::class,
21
        \App\Console\Commands\MakeConfig::class,
22
    ];
23
24
    /**
25
     * Define the application's command schedule.
26
     *
27
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
28
     * @return void
29
     */
30
    protected function schedule(Schedule $schedule) {
31
        $schedule->call(function() {
0 ignored issues
show
Documentation introduced by
function () { $confi...Build($buildContext); } is of type object<Closure>, but the function expects a string.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
32
            /** @var ConfigManager $configManager */
33
            $configManager = $this->app->make('App\Satis\ConfigManager');
34
35
            $buildContext = new PublicRepository();
36
37
            $configManager->forceBuild($buildContext);
38
        })->everyMinute()
39
            ->name('satis-config')
40
            ->withoutOverlapping()
41
            ->appendOutputTo(storage_path('logs/cron.log'));
42
    }
43
}
44