1 | <?php |
||
13 | abstract class Server |
||
14 | { |
||
15 | /** @var Router */ |
||
16 | protected $router; |
||
17 | |||
18 | /** @var Request */ |
||
19 | protected $request; |
||
20 | |||
21 | /** @var HeaderContainer */ |
||
22 | protected $headerContainer; |
||
23 | |||
24 | /** @var \Stitcher\Exception\ErrorHandler */ |
||
25 | protected $errorHandler; |
||
26 | |||
27 | abstract protected function handleStaticRoute(): ?Response; |
||
28 | |||
29 | 3 | public function setRouter(Router $router): Server |
|
35 | |||
36 | 3 | public function setHeaderContainer(HeaderContainer $headerContainer): Server |
|
37 | { |
||
38 | 3 | $this->headerContainer = $headerContainer; |
|
39 | |||
40 | 3 | return $this; |
|
41 | } |
||
42 | |||
43 | 3 | public function setErrorHandler(ErrorHandler $errorHandler): Server |
|
44 | { |
||
45 | 3 | $this->errorHandler = $errorHandler; |
|
46 | |||
47 | 3 | return $this; |
|
48 | } |
||
49 | |||
50 | 4 | public function run(): string |
|
56 | |||
57 | 2 | protected function getRequest(): Request |
|
65 | |||
66 | 2 | protected function getCurrentPath(): string |
|
72 | |||
73 | protected function handleDynamicRoute(): ?Response |
||
81 | |||
82 | 4 | protected function createResponse(): Response |
|
107 | |||
108 | protected function createRedirectResponse(string $targetUrl): Response |
||
109 | { |
||
112 | |||
113 | protected function createErrorResponse(StitcherException $exception): Response |
||
121 | |||
122 | 4 | protected function handleResponse(Response $response): string |
|
138 | } |
||
139 |
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..