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

PredbCheck   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
eloc 6
c 2
b 1
f 0
dl 0
loc 26
rs 10

1 Method

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