Completed
Push — master ( 165f6b...2c48ba )
by Matthew
07:36 queued 19s
created

VerifyTrait::verifyGetJobArgs()   B

Complexity

Conditions 5
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 5

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 3
nc 2
nop 3
crap 5
1
<?php
2
3
namespace Dtc\QueueBundle\Manager;
4
5
use Dtc\QueueBundle\Exception\UnsupportedException;
6
7
trait VerifyTrait
8
{
9
    /**
10
     * @param string|null $workerName
11
     * @param string|null $methodName
12
     * @param bool        $prioritize
13
     *
14
     * @throws UnsupportedException
15
     */
16 23
    protected function verifyGetJobArgs($workerName = null, $methodName = null, $prioritize = true)
17
    {
18 23
        if (null !== $workerName || null !== $methodName || (isset($this->maxPriority) && true !== $prioritize)) {
19 6
            throw new UnsupportedException('Unsupported');
20
        }
21 20
    }
22
}
23