CustomOperation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 35
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getHandler() 0 4 1
A getPriority() 0 4 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