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   A

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 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
}