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.

DownloadCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProcyonWeb\TranslationGenerator;
6
7
use Illuminate\Console\Command;
8
9
class DownloadCommand extends Command
10
{
11
    protected $signature = 'translation:download';
12
13
    protected $description = 'Download all translation json files from Lokalise';
14
15
    /** @var PhraseClient */
16
    private $client;
17
18
    public function __construct(PhraseClient $client)
19
    {
20
        parent::__construct();
21
        $this->client = $client;
22
    }
23
24
    public function handle(): void
25
    {
26
        $this->info('[PHRASE] Downloading files...');
27
        if ($this->client->isReady()) {
28
            $this->client->downloadFiles();
29
        } else {
30
            $this->error('[PHRASE] Please check Lokalise config.');
31
        }
32
    }
33
}