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 ( a93cc2...4d85e3 )
by Gabor
02:13
created

DownloadCommand::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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