ChainResult::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Chainable\Result;
4
5
final class ChainResult implements ChainResultInterface
6
{
7
    /**
8
     * @var bool
9
     */
10
    private $isSuccess;
11
    /**
12
     * @var mixed
13
     */
14
    private $data;
15
16
    /**
17
     * @param mixed $data
18
     * @param bool  $isSuccess
19
     */
20 3
    public function __construct($data, $isSuccess)
21
    {
22 3
        $this->data = $data;
23 3
        $this->isSuccess = $isSuccess;
24 3
    }
25
26
    /**
27
     * @return bool
28
     */
29 3
    public function isSuccess()
30
    {
31 3
        return $this->isSuccess;
32
    }
33
34
    /**
35
     * @return mixed
36
     */
37 2
    public function getData()
38
    {
39 2
        return $this->data;
40
    }
41
}
42