OperationResult   A
last analyzed

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 isSuccess() 0 4 1
1
<?php
2
3
namespace Storeman;
4
5
use Storeman\Operation\OperationInterface;
6
7
class OperationResult
8
{
9
    /**
10
     * @var OperationInterface
11
     */
12
    protected $operation;
13
14
    /**
15
     * @var bool
16
     */
17
    protected $success;
18
19
    public function __construct(OperationInterface $operation, bool $success)
20
    {
21
        $this->operation = $operation;
22
        $this->success = $success;
23
    }
24
25
    public function getOperation(): OperationInterface
26
    {
27
        return $this->operation;
28
    }
29
30
    public function isSuccess(): bool
31
    {
32
        return $this->success;
33
    }
34
}
35