Passed
Push — master ( 510a5e...0f9b0c )
by Roman
02:40 queued 14s
created

SimpleJob   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
1
<?php
2
3
namespace tests\app\jobs;
4
5
use yii\base\BaseObject;
6
use yii\queue\JobInterface;
7
8
/**
9
 * Simple Job
10
 */
11
class SimpleJob extends BaseObject implements JobInterface
12
{
13
    /**
14
     * @var int number of seconds to execute the job.
15
     */
16
    public $timeout = 10;
17
18
    /**
19
     * @inheritdoc
20
     */
21
    public function execute($queue)
22
    {
23
        sleep($this->timeout);
24
    }
25
}
26