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

JobRequeue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 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