OperationResult::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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