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.
Completed
Push — master ( 9e170a...fa9406 )
by Freek
04:03
created

CheckUptime::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\UptimeMonitor\Commands;
4
5
use Spatie\UptimeMonitor\Models\Site;
6
use Spatie\UptimeMonitor\Services\PingMonitors\UptimeChecker;
7
use Spatie\UptimeMonitor\Services\PingMonitors\UptimeMonitorCollection;
8
use Spatie\UptimeMonitor\SiteRepository;
9
10
class CheckUptime extends BaseCommand
11
{
12
    /**
13
     * The name and signature of the console command.
14
     *
15
     * @var string
16
     */
17
    protected $signature = 'uptime-monitor:check-uptime';
18
19
    /**
20
     * The console command description.
21
     *
22
     * @var string
23
     */
24
    protected $description = 'Check the uptime of all sites';
25
26
    public function handle()
27
    {
28
        $sites = SiteRepository::getAllForUptimeCheck();
29
30
        $this->comment('Start checking the uptime of '.count($sites).' sites...');
31
32
        $sites->checkUptime();
33
34
        $this->info('All done!');
35
    }
36
}
37