AsyncChildResponse   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getStdOut() 0 3 1
A getError() 0 3 1
A __construct() 0 8 1
A getJobResult() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Async;
5
6
use Exception;
7
8
class AsyncChildResponse
9
{
10
    private $jobResult;
11
    private $stdout;
12
    private $error;
13
14
    public function __construct(
15
        $jobResult,
16
        ?string $stdout = null,
17
        ?Exception $error = null
18
    ) {
19
        $this->jobResult = $jobResult;
20
        $this->stdout = $stdout;
21
        $this->error = $error;
22
    }
23
24
    public function getJobResult()
25
    {
26
        return $this->jobResult;
27
    }
28
29
    public function getStdOut(): ?string
30
    {
31
        return $this->stdout;
32
    }
33
34
    public function getError(): ?Exception
35
    {
36
        return $this->error;
37
    }
38
}