Skip to content

Commit b7c8db9

Browse files
Cleanup more @return annotations
1 parent 228488d commit b7c8db9

17 files changed

+88
-88
lines changed

BinaryFileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function setFile($file, string $contentDisposition = null, bool $autoEtag
118118
/**
119119
* Gets the file.
120120
*
121-
* @return File The file to stream
121+
* @return File
122122
*/
123123
public function getFile()
124124
{

Cookie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function withSameSite(?string $sameSite): self
257257
/**
258258
* Returns the cookie as a string.
259259
*
260-
* @return string The cookie
260+
* @return string
261261
*/
262262
public function __toString()
263263
{

File/File.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(string $path, bool $checkPath = true)
4747
* This method uses the mime type as guessed by getMimeType()
4848
* to guess the file extension.
4949
*
50-
* @return string|null The guessed extension or null if it cannot be guessed
50+
* @return string|null
5151
*
5252
* @see MimeTypes
5353
* @see getMimeType()
@@ -68,7 +68,7 @@ public function guessExtension()
6868
* which uses finfo_file() then the "file" system binary,
6969
* depending on which of those are available.
7070
*
71-
* @return string|null The guessed mime type (e.g. "application/pdf")
71+
* @return string|null
7272
*
7373
* @see MimeTypes
7474
*/
@@ -84,7 +84,7 @@ public function getMimeType()
8484
/**
8585
* Moves the file to a new location.
8686
*
87-
* @return self A File object representing the new file
87+
* @return self
8888
*
8989
* @throws FileException if the target file could not be created
9090
*/

File/UploadedFile.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(string $path, string $originalName, string $mimeType
7676
* It is extracted from the request from which the file has been uploaded.
7777
* Then it should not be considered as a safe value.
7878
*
79-
* @return string The original name
79+
* @return string
8080
*/
8181
public function getClientOriginalName()
8282
{
@@ -89,7 +89,7 @@ public function getClientOriginalName()
8989
* It is extracted from the original file name that was uploaded.
9090
* Then it should not be considered as a safe value.
9191
*
92-
* @return string The extension
92+
* @return string
9393
*/
9494
public function getClientOriginalExtension()
9595
{
@@ -105,7 +105,7 @@ public function getClientOriginalExtension()
105105
* For a trusted mime type, use getMimeType() instead (which guesses the mime
106106
* type based on the file content).
107107
*
108-
* @return string The mime type
108+
* @return string
109109
*
110110
* @see getMimeType()
111111
*/
@@ -126,7 +126,7 @@ public function getClientMimeType()
126126
* For a trusted extension, use guessExtension() instead (which guesses
127127
* the extension based on the guessed mime type for the file).
128128
*
129-
* @return string|null The guessed extension or null if it cannot be guessed
129+
* @return string|null
130130
*
131131
* @see guessExtension()
132132
* @see getClientMimeType()
@@ -146,17 +146,17 @@ public function guessClientExtension()
146146
* If the upload was successful, the constant UPLOAD_ERR_OK is returned.
147147
* Otherwise one of the other UPLOAD_ERR_XXX constants is returned.
148148
*
149-
* @return int The upload error
149+
* @return int
150150
*/
151151
public function getError()
152152
{
153153
return $this->error;
154154
}
155155

156156
/**
157-
* Returns whether the file was uploaded successfully.
157+
* Returns whether the file has been uploaded with HTTP and no error occurred.
158158
*
159-
* @return bool True if the file has been uploaded with HTTP and no error occurred
159+
* @return bool
160160
*/
161161
public function isValid()
162162
{
@@ -168,7 +168,7 @@ public function isValid()
168168
/**
169169
* Moves the file to a new location.
170170
*
171-
* @return File A File object representing the new file
171+
* @return File
172172
*
173173
* @throws FileException if, for any reason, the file could not have been moved
174174
*/
@@ -264,7 +264,7 @@ private static function parseFilesize(string $size)
264264
/**
265265
* Returns an informative upload error message.
266266
*
267-
* @return string The error message regarding the specified error code
267+
* @return string
268268
*/
269269
public function getErrorMessage()
270270
{

HeaderBag.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(array $headers = [])
3434
/**
3535
* Returns the headers as a string.
3636
*
37-
* @return string The headers
37+
* @return string
3838
*/
3939
public function __toString()
4040
{
@@ -60,7 +60,7 @@ public function __toString()
6060
*
6161
* @param string|null $key The name of the headers to return or null to get them all
6262
*
63-
* @return array An array of headers
63+
* @return array
6464
*/
6565
public function all(string $key = null)
6666
{
@@ -74,7 +74,7 @@ public function all(string $key = null)
7474
/**
7575
* Returns the parameter keys.
7676
*
77-
* @return array An array of parameter keys
77+
* @return array
7878
*/
7979
public function keys()
8080
{
@@ -101,9 +101,9 @@ public function add(array $headers)
101101
}
102102

103103
/**
104-
* Returns a header value by name.
104+
* Returns the first header by name or the default one.
105105
*
106-
* @return string|null The first header value or default value
106+
* @return string|null
107107
*/
108108
public function get(string $key, string $default = null)
109109
{
@@ -154,7 +154,7 @@ public function set(string $key, $values, bool $replace = true)
154154
/**
155155
* Returns true if the HTTP header is defined.
156156
*
157-
* @return bool true if the parameter exists, false otherwise
157+
* @return bool
158158
*/
159159
public function has(string $key)
160160
{
@@ -164,7 +164,7 @@ public function has(string $key)
164164
/**
165165
* Returns true if the given HTTP header contains the given value.
166166
*
167-
* @return bool true if the value is contained in the header, false otherwise
167+
* @return bool
168168
*/
169169
public function contains(string $key, string $value)
170170
{
@@ -188,7 +188,7 @@ public function remove(string $key)
188188
/**
189189
* Returns the HTTP header value converted to a date.
190190
*
191-
* @return \DateTimeInterface|null The parsed DateTime or the default value if the header does not exist
191+
* @return \DateTimeInterface|null
192192
*
193193
* @throws \RuntimeException When the HTTP header is not parseable
194194
*/
@@ -220,7 +220,7 @@ public function addCacheControlDirective(string $key, $value = true)
220220
/**
221221
* Returns true if the Cache-Control directive is defined.
222222
*
223-
* @return bool true if the directive exists, false otherwise
223+
* @return bool
224224
*/
225225
public function hasCacheControlDirective(string $key)
226226
{
@@ -230,7 +230,7 @@ public function hasCacheControlDirective(string $key)
230230
/**
231231
* Returns a Cache-Control directive value by name.
232232
*
233-
* @return bool|string|null The directive value if defined, null otherwise
233+
* @return bool|string|null
234234
*/
235235
public function getCacheControlDirective(string $key)
236236
{
@@ -261,7 +261,7 @@ public function getIterator()
261261
/**
262262
* Returns the number of headers.
263263
*
264-
* @return int The number of headers
264+
* @return int
265265
*/
266266
#[\ReturnTypeWillChange]
267267
public function count()
@@ -279,7 +279,7 @@ protected function getCacheControlHeader()
279279
/**
280280
* Parses a Cache-Control HTTP header.
281281
*
282-
* @return array An array representing the attribute values
282+
* @return array
283283
*/
284284
protected function parseCacheControl(string $header)
285285
{

HeaderUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static function unquote(string $s): string
154154
* is semantically equivalent to $filename. If the filename is already ASCII,
155155
* it can be omitted, or just copied from $filename
156156
*
157-
* @return string A string suitable for use as a Content-Disposition field-value
157+
* @return string
158158
*
159159
* @throws \InvalidArgumentException
160160
*

IpUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private function __construct()
3232
*
3333
* @param string|array $ips List of IPs or subnets (can be a string if only a single one)
3434
*
35-
* @return bool Whether the IP is valid
35+
* @return bool
3636
*/
3737
public static function checkIp(?string $requestIp, $ips)
3838
{
@@ -102,7 +102,7 @@ public static function checkIp4(?string $requestIp, string $ip)
102102
*
103103
* @param string $ip IPv6 address or subnet in CIDR notation
104104
*
105-
* @return bool Whether the IP is valid
105+
* @return bool
106106
*
107107
* @throws \RuntimeException When IPV6 support is not enabled
108108
*/

ParameterBag.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(array $parameters = [])
3535
*
3636
* @param string|null $key The name of the parameter to return or null to get them all
3737
*
38-
* @return array An array of parameters
38+
* @return array
3939
*/
4040
public function all(/*string $key = null*/)
4141
{
@@ -55,7 +55,7 @@ public function all(/*string $key = null*/)
5555
/**
5656
* Returns the parameter keys.
5757
*
58-
* @return array An array of parameter keys
58+
* @return array
5959
*/
6060
public function keys()
6161
{
@@ -103,7 +103,7 @@ public function set(string $key, $value)
103103
/**
104104
* Returns true if the parameter is defined.
105105
*
106-
* @return bool true if the parameter exists, false otherwise
106+
* @return bool
107107
*/
108108
public function has(string $key)
109109
{
@@ -121,7 +121,7 @@ public function remove(string $key)
121121
/**
122122
* Returns the alphabetic characters of the parameter value.
123123
*
124-
* @return string The filtered value
124+
* @return string
125125
*/
126126
public function getAlpha(string $key, string $default = '')
127127
{
@@ -131,7 +131,7 @@ public function getAlpha(string $key, string $default = '')
131131
/**
132132
* Returns the alphabetic characters and digits of the parameter value.
133133
*
134-
* @return string The filtered value
134+
* @return string
135135
*/
136136
public function getAlnum(string $key, string $default = '')
137137
{
@@ -141,7 +141,7 @@ public function getAlnum(string $key, string $default = '')
141141
/**
142142
* Returns the digits of the parameter value.
143143
*
144-
* @return string The filtered value
144+
* @return string
145145
*/
146146
public function getDigits(string $key, string $default = '')
147147
{
@@ -152,7 +152,7 @@ public function getDigits(string $key, string $default = '')
152152
/**
153153
* Returns the parameter value converted to integer.
154154
*
155-
* @return int The filtered value
155+
* @return int
156156
*/
157157
public function getInt(string $key, int $default = 0)
158158
{
@@ -162,7 +162,7 @@ public function getInt(string $key, int $default = 0)
162162
/**
163163
* Returns the parameter value converted to boolean.
164164
*
165-
* @return bool The filtered value
165+
* @return bool
166166
*/
167167
public function getBoolean(string $key, bool $default = false)
168168
{
@@ -216,7 +216,7 @@ public function getIterator()
216216
/**
217217
* Returns the number of parameters.
218218
*
219-
* @return int The number of parameters
219+
* @return int
220220
*/
221221
#[\ReturnTypeWillChange]
222222
public function count()

RedirectResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function create($url = '', int $status = 302, array $headers = [])
6666
/**
6767
* Returns the target URL.
6868
*
69-
* @return string target URL
69+
* @return string
7070
*/
7171
public function getTargetUrl()
7272
{

0 commit comments

Comments
 (0)