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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 2
A __construct() 0 4 1
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
}