The expression return $this->code could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
22
}
23
public function getHeaders(): array
24
{
25
return $this->headers;
26
}
27
public function getFormat(): ?string
28
{
29
return $this->format;
30
}
31
public function getParams(): array
32
{
33
return $this->params;
34
}
35
public function getData()
36
{
37
return $this->data;
38
}
39
40
public function setCode(?int $code = 200): self
41
{
42
$this->code = $code;
43
return $this;
44
}
45
public function setHeaders(array $headers = []): self
46
{
47
$this->headers = $headers;
48
return $this;
49
}
50
public function addHeaders(array $headers = []): self
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.