Skip to content

Commit e302b17

Browse files
Merge branch '5.4' into 6.0
* 5.4: More return type fixes (bis) Cleanup `@return` annotations
2 parents 45e3304 + d248dfe commit e302b17

File tree

3 files changed

+16
-28
lines changed

3 files changed

+16
-28
lines changed

AbstractBrowser.php

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ public function getMaxRedirects()
105105
/**
106106
* Sets the insulated flag.
107107
*
108-
* @param bool $insulated Whether to insulate the requests or not
109-
*
110108
* @throws \RuntimeException When Symfony Process Component is not installed
111109
*/
112110
public function insulate(bool $insulated = true)
@@ -120,8 +118,6 @@ public function insulate(bool $insulated = true)
120118

121119
/**
122120
* Sets server parameters.
123-
*
124-
* @param array $server An array of server parameters
125121
*/
126122
public function setServerParameters(array $server)
127123
{
@@ -141,7 +137,7 @@ public function setServerParameter(string $key, string $value)
141137
/**
142138
* Gets single server parameter for specified key.
143139
*
144-
* @return mixed A value of the parameter
140+
* @return mixed
145141
*/
146142
public function getServerParameter(string $key, mixed $default = '')
147143
{
@@ -180,7 +176,7 @@ public function jsonRequest(string $method, string $uri, array $parameters = [],
180176
/**
181177
* Returns the History instance.
182178
*
183-
* @return History A History instance
179+
* @return History
184180
*/
185181
public function getHistory()
186182
{
@@ -190,7 +186,7 @@ public function getHistory()
190186
/**
191187
* Returns the CookieJar instance.
192188
*
193-
* @return CookieJar A CookieJar instance
189+
* @return CookieJar
194190
*/
195191
public function getCookieJar()
196192
{
@@ -200,7 +196,7 @@ public function getCookieJar()
200196
/**
201197
* Returns the current Crawler instance.
202198
*
203-
* @return Crawler A Crawler instance
199+
* @return Crawler
204200
*/
205201
public function getCrawler()
206202
{
@@ -214,7 +210,7 @@ public function getCrawler()
214210
/**
215211
* Returns the current BrowserKit Response instance.
216212
*
217-
* @return Response A BrowserKit Response instance
213+
* @return Response
218214
*/
219215
public function getInternalResponse()
220216
{
@@ -231,7 +227,7 @@ public function getInternalResponse()
231227
* The origin response is the response instance that is returned
232228
* by the code that handles requests.
233229
*
234-
* @return object A response instance
230+
* @return object
235231
*
236232
* @see doRequest()
237233
*/
@@ -247,7 +243,7 @@ public function getResponse()
247243
/**
248244
* Returns the current BrowserKit Request instance.
249245
*
250-
* @return Request A BrowserKit Request instance
246+
* @return Request
251247
*/
252248
public function getInternalRequest()
253249
{
@@ -264,7 +260,7 @@ public function getInternalRequest()
264260
* The origin request is the request instance that is sent
265261
* to the code that handles requests.
266262
*
267-
* @return object A Request instance
263+
* @return object
268264
*
269265
* @see doRequest()
270266
*/
@@ -433,9 +429,7 @@ public function request(string $method, string $uri, array $parameters = [], arr
433429
/**
434430
* Makes a request in another process.
435431
*
436-
* @param object $request An origin request instance
437-
*
438-
* @return object An origin response instance
432+
* @return object
439433
*
440434
* @throws \RuntimeException When processing returns exit code
441435
*/
@@ -470,9 +464,7 @@ protected function doRequestInProcess(object $request)
470464
/**
471465
* Makes a request.
472466
*
473-
* @param object $request An origin request instance
474-
*
475-
* @return object An origin response instance
467+
* @return object
476468
*/
477469
abstract protected function doRequest(object $request);
478470

@@ -491,7 +483,7 @@ protected function getScript(object $request)
491483
/**
492484
* Filters the BrowserKit request to the origin one.
493485
*
494-
* @return object An origin request instance
486+
* @return object
495487
*/
496488
protected function filterRequest(Request $request)
497489
{
@@ -501,9 +493,7 @@ protected function filterRequest(Request $request)
501493
/**
502494
* Filters the origin response to the BrowserKit one.
503495
*
504-
* @param object $response The origin response to filter
505-
*
506-
* @return Response An BrowserKit Response instance
496+
* @return Response
507497
*/
508498
protected function filterResponse(object $response)
509499
{
@@ -647,8 +637,6 @@ public function restart()
647637
/**
648638
* Takes a URI and converts it to absolute if it is not already absolute.
649639
*
650-
* @param string $uri A URI
651-
*
652640
* @return string An absolute URI
653641
*/
654642
protected function getAbsoluteUri(string $uri)

CookieJar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function set(Cookie $cookie)
3333
* (this behavior ensures a BC behavior with previous versions of
3434
* Symfony).
3535
*
36-
* @return Cookie|null A Cookie instance or null if the cookie does not exist
36+
* @return Cookie|null
3737
*/
3838
public function get(string $name, string $path = '/', string $domain = null)
3939
{

History.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function isEmpty()
5353
/**
5454
* Goes back in the history.
5555
*
56-
* @return Request A Request instance
56+
* @return Request
5757
*
5858
* @throws \LogicException if the stack is already on the first page
5959
*/
@@ -69,7 +69,7 @@ public function back()
6969
/**
7070
* Goes forward in the history.
7171
*
72-
* @return Request A Request instance
72+
* @return Request
7373
*
7474
* @throws \LogicException if the stack is already on the last page
7575
*/
@@ -85,7 +85,7 @@ public function forward()
8585
/**
8686
* Returns the current element in the history.
8787
*
88-
* @return Request A Request instance
88+
* @return Request
8989
*
9090
* @throws \LogicException if the stack is empty
9191
*/

0 commit comments

Comments
 (0)