Passed
Push — master ( 4b0ec9...a33902 )
by Darko
08:19
created

PredbCheck::handle()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Models\Predb;
6
use Illuminate\Console\Command;
7
8
class PredbCheck extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'predb:check {limit?}';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Check PreDB releases for matching';
23
24
    /**
25
     * Execute the console command.
26
     */
27
    public function handle(): int
28
    {
29
        $limit = $this->argument('limit');
30
31
        Predb::checkPre(is_numeric($limit) ? (int) $limit : false);
32
33
        return self::SUCCESS;
34
    }
35
}
36