Skip to content

Commit

Permalink
minor #24351 [Routing] Enhance Route(Collection) docblocks (ogizanagi)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stof committed Sep 28, 2017
2 parents 7ea1824 + 5b4308e commit 9ed6dd4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions src/Symfony/Component/Routing/Route.php
Expand Up @@ -30,12 +30,12 @@ class Route implements \Serializable
private $host = '';

/**
* @var array
* @var string[]
*/
private $schemes = array();

/**
* @var array
* @var string[]
*/
private $methods = array();

Expand Down Expand Up @@ -71,14 +71,14 @@ class Route implements \Serializable
*
* * compiler_class: A class name able to compile this route instance (RouteCompiler by default)
*
* @param string $path The path pattern to match
* @param array $defaults An array of default parameter values
* @param array $requirements An array of requirements for parameters (regexes)
* @param array $options An array of options
* @param string $host The host pattern to match
* @param string|array $schemes A required URI scheme or an array of restricted schemes
* @param string|array $methods A required HTTP method or an array of restricted methods
* @param string $condition A condition that should evaluate to true for the route to match
* @param string $path The path pattern to match
* @param array $defaults An array of default parameter values
* @param array $requirements An array of requirements for parameters (regexes)
* @param array $options An array of options
* @param string $host The host pattern to match
* @param string|string[] $schemes A required URI scheme or an array of restricted schemes
* @param string|string[] $methods A required HTTP method or an array of restricted methods
* @param string $condition A condition that should evaluate to true for the route to match
*/
public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '')
{
Expand Down Expand Up @@ -230,7 +230,7 @@ public function setHost($pattern)
* Returns the lowercased schemes this route is restricted to.
* So an empty array means that any scheme is allowed.
*
* @return array The schemes
* @return string[] The schemes
*/
public function getSchemes()
{
Expand All @@ -243,7 +243,7 @@ public function getSchemes()
*
* This method implements a fluent interface.
*
* @param string|array $schemes The scheme or an array of schemes
* @param string|string[] $schemes The scheme or an array of schemes
*
* @return $this
*/
Expand Down Expand Up @@ -279,7 +279,7 @@ public function hasScheme($scheme)
* Returns the uppercased HTTP methods this route is restricted to.
* So an empty array means that any method is allowed.
*
* @return array The methods
* @return string[] The methods
*/
public function getMethods()
{
Expand All @@ -292,7 +292,7 @@ public function getMethods()
*
* This method implements a fluent interface.
*
* @param string|array $methods The method or an array of methods
* @param string|string[] $methods The method or an array of methods
*
* @return $this
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/Routing/RouteCollection.php
Expand Up @@ -104,7 +104,7 @@ public function get($name)
/**
* Removes a route or an array of routes by name from the collection.
*
* @param string|array $name The route name or an array of route names
* @param string|string[] $name The route name or an array of route names
*/
public function remove($name)
{
Expand Down Expand Up @@ -234,7 +234,7 @@ public function addOptions(array $options)
/**
* Sets the schemes (e.g. 'https') all child routes are restricted to.
*
* @param string|array $schemes The scheme or an array of schemes
* @param string|string[] $schemes The scheme or an array of schemes
*/
public function setSchemes($schemes)
{
Expand All @@ -246,7 +246,7 @@ public function setSchemes($schemes)
/**
* Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.
*
* @param string|array $methods The method or an array of methods
* @param string|string[] $methods The method or an array of methods
*/
public function setMethods($methods)
{
Expand Down

0 comments on commit 9ed6dd4

Please sign in to comment.