@@ -76,9 +76,8 @@ public function __construct(IPresenterFactory $presenterFactory, IRouter $router
7676
7777 /**
7878 * Dispatch a HTTP request to a front controller.
79- * @return void
8079 */
81- public function run ()
80+ public function run (): void
8281 {
8382 try {
8483 $ this ->onStartup ($ this );
@@ -103,10 +102,7 @@ public function run()
103102 }
104103
105104
106- /**
107- * @return Request
108- */
109- public function createInitialRequest ()
105+ public function createInitialRequest (): Request
110106 {
111107 $ request = $ this ->router ->match ($ this ->httpRequest );
112108 if (!$ request instanceof Request) {
@@ -116,10 +112,7 @@ public function createInitialRequest()
116112 }
117113
118114
119- /**
120- * @return void
121- */
122- public function processRequest (Request $ request )
115+ public function processRequest (Request $ request ): void
123116 {
124117 process:
125118 if (count ($ this ->requests ) > self ::$ maxLoop ) {
@@ -152,10 +145,7 @@ public function processRequest(Request $request)
152145 }
153146
154147
155- /**
156- * @return void
157- */
158- public function processException ($ e )
148+ public function processException (\Throwable $ e ): void
159149 {
160150 if (!$ e instanceof BadRequestException && $ this ->httpResponse instanceof Nette \Http \Response) {
161151 $ this ->httpResponse ->warnOnBuffer = FALSE ;
@@ -181,17 +171,16 @@ public function processException($e)
181171 * Returns all processed requests.
182172 * @return Request[]
183173 */
184- public function getRequests ()
174+ public function getRequests (): array
185175 {
186176 return $ this ->requests ;
187177 }
188178
189179
190180 /**
191181 * Returns current presenter.
192- * @return IPresenter|NULL
193182 */
194- public function getPresenter ()
183+ public function getPresenter (): ? IPresenter
195184 {
196185 return $ this ->presenter ;
197186 }
@@ -202,19 +191,17 @@ public function getPresenter()
202191
203192 /**
204193 * Returns router.
205- * @return IRouter
206194 */
207- public function getRouter ()
195+ public function getRouter (): IRouter
208196 {
209197 return $ this ->router ;
210198 }
211199
212200
213201 /**
214202 * Returns presenter factory.
215- * @return IPresenterFactory
216203 */
217- public function getPresenterFactory ()
204+ public function getPresenterFactory (): IPresenterFactory
218205 {
219206 return $ this ->presenterFactory ;
220207 }
0 commit comments