Completed
Push — master ( 44a00f...9727c6 )
by Arne
02:20
created

OperationListItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getOperation() 0 4 1
A getIndexObject() 0 4 1
1
<?php
2
3
namespace Storeman;
4
5
use Storeman\Index\IndexObject;
6
use Storeman\Operation\OperationInterface;
7
8
class OperationListItem
9
{
10
    /**
11
     * @var OperationInterface
12
     */
13
    protected $operation;
14
15
    /**
16
     * @var IndexObject
17
     */
18
    protected $indexObject;
19
20
    public function __construct(OperationInterface $operation, ?IndexObject $indexObject = null)
21
    {
22
        $this->operation = $operation;
23
        $this->indexObject = $indexObject;
24
    }
25
26
    public function getOperation(): OperationInterface
27
    {
28
        return $this->operation;
29
    }
30
31
    public function getIndexObject(): ?IndexObject
32
    {
33
        return $this->indexObject;
34
    }
35
}
36