8000 minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi) · symfony/symfony@9ed6dd4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ed6dd4

Browse files
committed
minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi)
This PR was merged into the 2.7 branch. Discussion ---------- [Routing] Enhance Route(Collection) docblocks | Q | A | ------------- | --- | Branch? | 2.7 <!-- see comment below --> | Bug fix? | no | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A Commits ------- 5b4308e [Routing] Enhance Route(Collection) docblocks
2 parents 7ea1824 + 5b4308e commit 9ed6dd4

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/Symfony/Component/Routing/Route.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ class Route implements \Serializable
3030
private $host = '';
3131

3232
/**
33-
* @var array
33+
* @var string[]
3434
*/
3535
private $schemes = array();
3636

3737
/**
38-
* @var array
38+
* @var string[]
3939
*/
4040
private $methods = array();
4141

@@ -71,14 +71,14 @@ class Route implements \Serializable
7171
*
7272
* * compiler_class: A class name able to compile this route instance (RouteCompiler by default)
7373
*
74-
* @param string $path The path pattern to match
75-
* @param array $defaults An array of default parameter values
76-
* @param array $requirements An array of requirements for parameters (regexes)
77-
* @param array $options An array of options
78-
* @param string $host The host pattern to match
79-
* @param string|array $schemes A required URI scheme or an array of restricted schemes
80-
* @param string|array $methods A required HTTP method or an array of restricted methods
81-
* @param string $condition A condition that should evaluate to true for the route to match
74+
* @param string $path The path pattern to match
75+
* @param array $defaults An array of default parameter values
76+
* @param array $requirements An array of requirements for parameters (regexes)
77+
* @param array $options An array of options
78+
* @param string $host The host pattern to match
79+
* @param string|string[] $schemes A required URI scheme or an array of restricted schemes
80+
* @param string|string[] $methods A required HTTP method or an array of restricted methods
81+
* @param string $condition A condition that should evaluate to true for the route to match
8282
*/
8383
public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '')
8484
{
@@ -230,7 +230,7 @@ public function setHost($pattern)
230230
* Returns the lowercased schemes this route is restricted to.
231231
* So an empty array means that any scheme is allowed.
232232
*
233-
* @return array The schemes
233+
* @return string[] The schemes
234234
*/
235235
public function getSchemes()
236236
{
@@ -243,7 +243,7 @@ public function getSchemes()
243243
*
244244
* This method implements a fluent interface.
245245
*
246-
* @param string|array $schemes The scheme or an array of schemes
246+
* @param string|string[] $schemes The scheme or an array of schemes
247247
*
248248
* @return $this
249249
*/
@@ -279,7 +279,7 @@ public function hasScheme($scheme)
279279
* Returns the uppercased HTTP methods this route is restricted to.
280280
* So an empty array means that any method is allowed.
281281
*
282-
* @return array The methods
282+
* @return string[] The methods
283283
*/
284284
public function getMethods()
285285
{
@@ -292,7 +292,7 @@ public function getMethods()
292292
*
293293
* This method implements a fluent interface.
294294
*
295-
* @param string|array $methods The method or an array of methods
295+
* @param string|string[] $methods The method or an array of methods
296296
*
297297
* @return $this
298298
*/

src/Symfony/Component/Routing/RouteCollection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function get($name)
104104
/**
105105
* Removes a route or an array of routes by name from the collection.
106106
*
107-
* @param string|array $name The route name or an array of route names
107+
* @param string|string[] $name The route name or an array of route names
108108
*/
109109
public function remove($name)
110110
{
@@ -234,7 +234,7 @@ public function addOptions(array $options)
234234
/**
235235
* Sets the schemes (e.g. 'https') all child routes are restricted to.
236236
*
237-
* @param string|array $schemes The scheme or an array of schemes
237+
* @param string|string[] $schemes The scheme or an array of schemes
238238
*/
239239
public function setSchemes($schemes)
240240
{
@@ -246,7 +246,7 @@ public function setSchemes($schemes)
246246
/**
247247
* Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.
248248
*
249-
* @param string|array $methods The method or an array of methods
249+
* @param string|string[] $methods The method or an array of methods
250250
*/
251251
public function setMethods($methods)
252252
{

0 commit comments

Comments
 (0)
0