Issues (5)

src/PayloadInterface.php (1 issue)

Labels
Severity
1
<?php
2
namespace RazonYang\JSend;
3
4
interface PayloadInterface
5
{
6
    /**
7
     * Returns a string that represents success, fail or error.
8
     *
9
     * @return string
10
     */
11
    public function getStatus(): string;
12
13
    /**
14
     * Sets status.
15
     *
16
     * @param string $status
17
     *
18
     * @return self
19
     */
20
    public function setStatus(string $status): self;
21
22
    /**
23
     * Returns data.
24
     *
25
     * @return mixed
26
     */
27
    public function getData();
28
29
    /**
30
     * Sets data.
31
     *
32
     * @param mixed $data
33
     *
34
     * @return self
35
     */
36
    public function setData($data): self;
37
38
    /**
39
     * Returns error message.
40
     *
41
     * @return null|string
42
     */
43
    public function getMessage(): ?string;
44
45
    /**
46
     * Sets message.
47
     *
48
     * @param string $message
49
     *
50
     * @return self
51
     */
52
    public function setMessage(string $message): self;
53
54
    /**
55
     * Returns error code.
56
     *
57
     * @return null|int
58
     */
59
    public function getCode(): ?int;
60
61
    /**
62
     * Sets error code.
63
     *
64
     * @param int $code
65
     *
66
     * @return self
67
     */
68
    public function setCode(int $code): self;
69
70
    /**
71
     * Returns an array represents the payload.
72
     *
73
     * @return array
74
     */
75
    public function toArray(): array;
76
77
    /**
78
     * Returns a string represents the payload.
79
     *
80
     * @param null|int json_encode $options.
0 ignored issues
show
The type RazonYang\JSend\json_encode was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
81
     *
82
     * @return string
83
     */
84
    public function toString(?int $options = null): string;
85
}
86