ExecutionResult::getReturnCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace ivol;
3
4
class ExecutionResult
5
{
6
    /** @var array */
7
    private $output;
8
    /** @var int */
9
    private $returnCode;
10
11
    /**
12
     * @param int $returnCode
13
     * @param array $output
14
     */
15 6
    public function __construct($returnCode, $output)
16
    {
17 6
        $this->returnCode = $returnCode;
18 6
        $this->output = $output;
19 6
    }
20
21
    /**
22
     * @return string
23
     */
24 4
    public function getOutput()
25
    {
26 4
        return $this->output ? implode('\n', $this->output): '';
27
    }
28
29
    /**
30
     * @return int
31
     */
32 3
    public function getReturnCode()
33
    {
34 3
        return $this->returnCode;
35
    }
36
37
}