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

SimpleJob::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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