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 ( 92bedd...82890f )
by
unknown
13:30 queued 01:04
created

HoneybadgerCheckInsSyncCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 18
dl 0
loc 39
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 18 2
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 check-ins 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('Check-ins were synchronized with Honeybadger.');
34
        $this->table(['Id', 'Name', 'Slug', 'Schedule Type', 'Report Period', 'Cron Schedule', 'Cron Timezone', 'Grace Period', 'Status'], array_map(function ($checkin) {
35
            return [
36
                $checkin->id,
37
                $checkin->name,
38
                $checkin->slug,
39
                $checkin->scheduleType,
40
                $checkin->reportPeriod,
41
                $checkin->cronSchedule,
42
                $checkin->cronTimezone,
43
                $checkin->gracePeriod,
44
                $checkin->isDeleted() ? '❌ Removed' : '✅ Synchronized',
45
            ];
46
        }, $result));
47
    }
48
}
49