GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 2809db...84b5a3 )
by Brent
01:29
created

ProcessOutput::setSuccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\Async\Output;
4
5
// TODO: Move to separate namespace
6
class ProcessOutput
7
{
8
    protected $payload;
9
    protected $success = false;
10
11
    public function __construct($payload)
12
    {
13
        $this->payload = $payload;
14
    }
15
16
    /**
17
     * @param $payload
18
     *
19
     * @return static
20
     */
21
    public static function create($payload)
22
    {
23
        return new static($payload);
24
    }
25
26
    public function setSuccess(bool $success = true): self
27
    {
28
        $this->success = $success;
29
30
        return $this;
31
    }
32
33
    public function isSuccess(): bool
34
    {
35
        return $this->success;
36
    }
37
38
    public function payload()
39
    {
40
        return $this->payload;
41
    }
42
43
    public function serialize()
44
    {
45
        return serialize($this);
46
    }
47
}
48