1 | <?php |
||
8 | class Server |
||
9 | { |
||
10 | /** |
||
11 | * Name of the server |
||
12 | * @var string |
||
13 | */ |
||
14 | public $name = "ReactRestify"; |
||
15 | |||
16 | /** |
||
17 | * Version of the API |
||
18 | * @var null |
||
19 | */ |
||
20 | public $version = null; |
||
21 | |||
22 | /** |
||
23 | * @var \React\Restify\Router |
||
24 | */ |
||
25 | private $router; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $allowOrigin = "*"; |
||
31 | |||
32 | /** |
||
33 | * @param null $name |
||
34 | * @param null $version |
||
35 | */ |
||
36 | public function __construct($name = null, $version = null) |
||
50 | |||
51 | /** |
||
52 | * Parse request from user |
||
53 | * |
||
54 | * @param \React\Http\Request $HttpRequest |
||
55 | * @param \React\Http\Response $HttpResponse |
||
56 | */ |
||
57 | public function __invoke(HttpRequest $httpRequest, HttpResponse $httpResponse) |
||
73 | |||
74 | /** |
||
75 | * Create a new group of route |
||
76 | * @param String $prefix prefix of the routes |
||
77 | * @param Callable $callback |
||
78 | * |
||
79 | * @return \CapMousse\ReactRestify\Routing\Routes |
||
80 | */ |
||
81 | public function group($prefix, $callback) |
||
85 | |||
86 | /** |
||
87 | * The the Access-Control-Allow-Origin header |
||
88 | * |
||
89 | * @param string $origin |
||
90 | */ |
||
91 | public function setAccessControlAllowOrigin($origin) |
||
95 | |||
96 | /** |
||
97 | * Init default event catch |
||
98 | * |
||
99 | * @return void |
||
100 | */ |
||
101 | private function initEvents() |
||
125 | |||
126 | /** |
||
127 | * Manual router event manager |
||
128 | * @param String $event |
||
129 | * @param Callable $callback |
||
130 | */ |
||
131 | public function on($event, $callback) |
||
136 | |||
137 | /** |
||
138 | * Create runner instance |
||
139 | * @param Int $port |
||
140 | * @param String $host |
||
141 | * @return Server |
||
142 | */ |
||
143 | public function listen($port, $host = "127.0.0.1") |
||
150 | |||
151 | /** |
||
152 | * @param string $name method to call |
||
153 | * @param array $arguments |
||
154 | */ |
||
155 | public function __call($name, $arguments) |
||
159 | } |
||
160 |
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..