Passed
Push — master ( 60b6ca...163cac )
by Kylian
06:19
created

Response::setErrorMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace KriKrixs\object\response;
4
5
use KriKrixs\object\beatmap\BeatMap;
6
7
class Response
8
{
9
    private bool        $errorStatus    = false;
10
    private string      $errorMessage   = "";
11
12
    /**
13
     * Get error status
14
     * @return bool
15
     */
16
    public function getErrorStatus(): bool
17
    {
18
        return $this->errorStatus;
19
    }
20
21
    /**
22
     * Get error message
23
     * @return string
24
     */
25
    public function getErrorMessage() :string
26
    {
27
        return $this->errorMessage;
28
    }
29
30
    /**
31
     * set error status
32
     * @param bool $errorStatus
33
     * @return Response
34
     */
35
    public function setErrorStatus(bool $errorStatus): Response
36
    {
37
        $this->errorStatus = $errorStatus;
38
        return $this;
39
    }
40
41
    /**
42
     * Set error message
43
     * @param string $errorMessage
44
     * @return Response
45
     */
46
    public function setErrorMessage(string $errorMessage): Response
47
    {
48
        $this->errorMessage = $errorMessage;
49
        return $this;
50
    }
51
}