Passed
Push — master ( 96ef05...f81447 )
by Darko
09:59
created

ProcessReleasesMulti   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 2
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Blacklight\libraries\Forking;
6
use Illuminate\Console\Command;
7
8
class ProcessReleasesMulti extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'multiprocessing:releases';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Create releases, delete unwanted releases, and categorize using multiprocessing';
23
24
    /**
25
     * Execute the console command.
26
     */
27
    public function handle(): int
28
    {
29
        try {
30
            (new Forking)->processWorkType('releases');
31
32
            return self::SUCCESS;
33
        } catch (\Exception $e) {
34
            $this->error($e->getMessage());
35
36
            return self::FAILURE;
37
        }
38
    }
39
}
40