Test Failed
Push — master ( f5a4d5...ab7fb6 )
by Hirofumi
03:37
created

JobRequeue   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A handle() 0 5 1
1
<?php
2
3
namespace Shippinno\Job\Infrastructure\Ui\Console\Laravel\Command;
4
5
use Illuminate\Console\Command;
6
use Shippinno\Job\Application\Messaging\RequeueAbandonedJobMessageService;
7
8
class JobRequeue extends Command
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    protected $signature = 'job:requeue {id}';
14
15
    /**
16
     * @var RequeueAbandonedJobMessageService
17
     */
18
    private $requeueAbandonedJobMessageService;
19
20
    public function __construct(RequeueAbandonedJobMessageService $requeueAbandonedJobMessageService)
21
    {
22
        parent::__construct();
23
        $this->requeueAbandonedJobMessageService = $requeueAbandonedJobMessageService;
24
    }
25
26
    public function handle()
27
    {
28
        $id = intval($this->argument('id'));
29
        $this->requeueAbandonedJobMessageService->execute($id);
30
    }
31
}
32