Result   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getOutputArray() 0 3 1
A getOutputString() 0 3 1
A __construct() 0 4 1
A getReturnCode() 0 3 1
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