Result::getOutputString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Bicycle\Tesseract\Bridge\CLI;
4
5
class Result
6
{
7
    /** @var int */
8
    private int $returnCode;
9
10
    /** @var array */
11
    private array $outputArray;
12
13
    /**
14
     * @param int   $returnCode
15
     * @param array $outputArray
16
     */
17
    public function __construct(int $returnCode, array $outputArray)
18
    {
19
        $this->returnCode = $returnCode;
20
        $this->outputArray = $outputArray;
21
    }
22
23
    /**
24
     * @return int
25
     */
26
    public function getReturnCode(): int
27
    {
28
        return $this->returnCode;
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function getOutputArray(): array
35
    {
36
        return $this->outputArray;
37
    }
38
39
    public function getOutputString(): string
40
    {
41
        return implode(PHP_EOL, $this->getOutputArray());
42
    }
43
}
44