CustomOperation::getPriority()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 0
crap 1
1
<?php
2
namespace Nayjest\Querying\Operation;
3
4
class CustomOperation implements OperationInterface
5
{
6
7
    /**
8
     * @var callable
9
     */
10
    private $handler;
11
    /**
12
     * @var int
13
     */
14
    private $priority;
15
16 4
    public function __construct(callable $handler, $priority)
17
    {
18
19 4
        $this->handler = $handler;
20 4
        $this->priority = $priority;
21 4
    }
22
23
    /**
24
     * @return callable
25
     */
26 4
    public function getHandler()
27
    {
28 4
        return $this->handler;
29
    }
30
31
    /**
32
     * @return int
33
     */
34 4
    public function getPriority()
35
    {
36 4
        return $this->priority;
37
    }
38
}
39