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

ProcessReleasesMulti::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 10
rs 10
cc 2
nc 2
nop 0
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