GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 0866f6...335175 )
by
unknown
11:42 queued 08:28
created

HoneybadgerCheckinsSyncCommand::handle()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 16
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 13
c 2
b 0
f 0
dl 0
loc 16
rs 9.8333
cc 2
nc 1
nop 1
1
<?php
2
3
namespace Honeybadger\HoneybadgerLaravel\Commands;
4
5
use Honeybadger\Contracts\SyncCheckins;
6
use Illuminate\Console\Command;
7
8
class HoneybadgerCheckinsSyncCommand extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'honeybadger:checkins:sync';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Synchronize checkins to Honeybadger';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return mixed
28
     */
29
    public function handle(SyncCheckins $checkinsManager)
30
    {
31
        $localCheckins = config('honeybadger.checkins', []);
32
        $result = $checkinsManager->sync($localCheckins);
33
        $this->info('Checkins were synchronized with Honeybadger.');
34
        $this->table(['Id', 'Name', 'Schedule Type', 'Cron Schedule', 'Cron Timezone', 'Grace Period', 'Status'], array_map(function ($checkin) {
35
            return [
36
                $checkin->id,
37
                $checkin->name,
38
                $checkin->scheduleType,
39
                $checkin->cronSchedule,
40
                $checkin->cronTimezone,
41
                $checkin->gracePeriod,
42
                $checkin->isDeleted() ? '❌ Removed' : '✅ Synchronized',
43
            ];
44
        }, $result));
45
    }
46
}
47