Kernel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 65
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B schedule() 0 37 1
1
<?php
2
3
namespace App\Console;
4
5
use Illuminate\Console\Scheduling\Schedule;
6
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7
8
class Kernel extends ConsoleKernel
9
{
10
    /**
11
     * The Artisan commands provided by your application.
12
     *
13
     * @var array
14
     */
15
    protected $commands = [
16
        \App\Console\Commands\Inspire::class,
17
        \App\Console\Commands\SetExpired::class,
18
        \App\Console\Commands\SmsEvent::class,
19
        \App\Console\Commands\SmsExpiring::class,
20
        \App\Console\Commands\ExpenseAlert::class,
21
        \App\Console\Commands\PendingInvoice::class,
22
        \App\Console\Commands\FollowupSms::class,
23
        \App\Console\Commands\SmsExpired::class,
24
        \App\Console\Commands\RepeatExpense::class,
25
        \App\Console\Commands\BirthdaySms::class,
26
        \App\Console\Commands\SmsStatus::class,
27
        \App\Console\Commands\ReshootOfflineSms::class,
28
    ];
29
30
    /**
31
     * Define the application's command schedule.
32
     *
33
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
34
     * @return void
35
     */
36
    protected function schedule(Schedule $schedule)
37
    {   
38
        $schedule->command('reshoot:offlineSms')
39
                 ->hourly();
40
41
        $schedule->command('birthday:sms')
42
                 ->dailyAt('00:01');
43
44
        $schedule->command('set:expired')
45
                 ->dailyAt('00:05');
46
47
        $schedule->command('sms:event')
48
                 ->dailyAt('09:00');
49
50
        $schedule->command('sms:expiring')
51
                 ->dailyAt('10:00');
52
53
        $schedule->command('expense:alert')
54
                 ->dailyAt('10:30')
55
                 ->when(function () {
56
                    return (\Utilities::getSetting('primary_contact') != null);
57
                });
58
59
        $schedule->command('pending:invoice')
60
                 ->dailyAt('11:00');
61
62
        $schedule->command('followup:sms')
63
                 ->dailyAt('11:30');
64
65
        $schedule->command('sms:expired')
66
                 ->dailyAt('11:45');
67
68
        $schedule->command('repeat:expense')
69
                 ->dailyAt('23:00');
70
71
        $schedule->command('sms:status')
72
                 ->dailyAt('23:45');
73
    }
74
}
75