It seems like new \Toolshedr\Core\Headers() of type object<Toolshedr\Core\Headers> is incompatible with the declared type object<Headers> of property $headers.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
It seems like new \Toolshedr\Core\Request() of type object<Toolshedr\Core\Request> is incompatible with the declared type object<Request> of property $request.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
It seems like new \Toolshedr\Core\Response() of type object<Toolshedr\Core\Response> is incompatible with the declared type object<Response> of property $response.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
36
}
37
38
/**
39
* Whitelist your UI
40
*
41
* @param $origin
42
* @return void
43
*/
44
public function whitelist(string $origin)
45
{
46
$this->headers->addToWhitelist($origin);
47
}
48
49
/**
50
* Set API KEY
51
*
52
* @param string $api_key
53
* @return void
54
*/
55
public function setApiKey(string $api_key)
56
{
57
$this->request->setApiKey($api_key);
58
}
59
60
/**
61
* Run the server
62
*
63
* @return void
64
*/
65
public function run()
66
{
67
/**
68
* Check are request headers ok
69
*/
70
if ($this->headers->areOk() && !$this->request->isOptionRequest()) {
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..