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 ( 1f0c23...177ac6 )
by Freek
01:50
created

UncheckedSites   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 31
rs 10
c 1
b 0
f 0
wmc 3
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A display() 0 21 2
1
<?php
2
3
namespace Spatie\UptimeMonitor\Commands\SiteLists;
4
5
use Illuminate\Console\Command;
6
use Spatie\UptimeMonitor\Helpers\Emoji;
7
use Spatie\UptimeMonitor\Models\Site;
8
use Spatie\UptimeMonitor\SiteRepository;
9
10
class UncheckedSites
11
{
12
    protected $output;
13
14
    public function __construct(Command $output)
15
    {
16
        $this->output = $output;
17
    }
18
19
    public function display()
20
    {
21
        $downSites = SiteRepository::uncheckedSites();
22
23
        if (! $downSites->count()) {
24
            return;
25
        }
26
27
        $this->output->info('Sites that have not been checked yet');
28
        $this->output->info('====================================');
29
30
        $rows = $downSites->map(function (Site $site) {
31
            $url = $site->url;
32
33
            return compact('url');
34
        });
35
36
        $titles = ['URL'];
37
38
        $this->output->table($titles, $rows);
39
    }
40
}
41