Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Candidates/Candidates.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Candidates implements CandidatesInterface
protected $limit;

/**
* @param array $locales The locales to support.
* @param int $limit A limit to apply to the candidates generated.
* @param array $locales The locales to support
* @param int $limit A limit to apply to the candidates generated
*/
public function __construct(array $locales = array(), $limit = 20)
{
Expand All @@ -52,7 +52,7 @@ public function __construct(array $locales = array(), $limit = 20)
/**
* Set the locales to support by this strategy.
*
* @param array $locales The locales to support.
* @param array $locales The locales to support
*/
public function setLocales(array $locales)
{
Expand Down Expand Up @@ -97,9 +97,9 @@ public function getCandidates(Request $request)
/**
* Determine the locale of this URL.
*
* @param string $url The url to determine the locale from.
* @param string $url The url to determine the locale from
*
* @return string|bool The locale if $url starts with one of the allowed locales.
* @return string|bool The locale if $url starts with one of the allowed locales
*/
protected function determineLocale($url)
{
Expand All @@ -120,11 +120,11 @@ protected function determineLocale($url)
*
* $prefix is prepended to every candidate generated.
*
* @param string $url The URL to split.
* @param string $prefix A prefix to prepend to every pattern.
* @param string $url The URL to split
* @param string $prefix A prefix to prepend to every pattern
*
* @return array Paths that could represent routes that match $url and are
* child of $prefix.
* child of $prefix
*/
protected function getCandidatesFor($url, $prefix = '')
{
Expand Down
2 changes: 1 addition & 1 deletion Candidates/CandidatesInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function isCandidate($name);
* Provide a best effort query restriction to limit a query to only find
* routes that are supported.
*
* @param object $queryBuilder A query builder suited for the storage backend.
* @param object $queryBuilder A query builder suited for the storage backend
*/
public function restrictQuery($queryBuilder);
}
2 changes: 1 addition & 1 deletion ChainRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function matchRequest(Request $request)
*
* @return array An array of parameters
*
* @throws ResourceNotFoundException If no router matched.
* @throws ResourceNotFoundException If no router matched
*/
private function doMatch($pathinfo, Request $request = null)
{
Expand Down
4 changes: 2 additions & 2 deletions ChainRouterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ interface ChainRouterInterface extends RouterInterface, RequestMatcherInterface
* Add a Router to the index.
*
* @param RouterInterface $router The router instance. Instead of RouterInterface, may also
* be RequestMatcherInterface and UrlGeneratorInterface.
* be RequestMatcherInterface and UrlGeneratorInterface
* @param int $priority The priority
*/
public function add($router, $priority = 0);

/**
* Sorts the routers and flattens them.
*
* @return RouterInterface[] or RequestMatcherInterface and UrlGeneratorInterface.
* @return RouterInterface[] or RequestMatcherInterface and UrlGeneratorInterface
*/
public function all();
}
12 changes: 6 additions & 6 deletions ContentAwareGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public function setContentRepository(ContentRepositoryInterface $contentReposito
/**
* {@inheritdoc}
*
* @param string $name ignored.
* @param string $name ignored
* @param array $parameters must either contain the field 'route' with a
* RouteObjectInterface or the field 'content_id'
* with the id of a document implementing
* RouteReferrersReadInterface.
* RouteReferrersReadInterface
*
* @throws RouteNotFoundException If there is no such route in the database
*/
Expand Down Expand Up @@ -228,7 +228,7 @@ protected function getRouteByLocale($routes, $locale)
*
* @return bool true if there is either no $locale, no _locale requirement
* on the route or if the requirement and the passed $locale
* match.
* match
*/
private function checkLocaleRequirement(SymfonyRoute $route, $locale)
{
Expand All @@ -245,7 +245,7 @@ private function checkLocaleRequirement(SymfonyRoute $route, $locale)
*
* @return string the locale following of the parameters or any other
* information the router has available. defaultLocale if no
* other locale can be determined.
* other locale can be determined
*/
protected function getLocale($parameters)
{
Expand Down Expand Up @@ -300,9 +300,9 @@ public function getRouteDebugMessage($name, array $parameters = array())
* and it is the default locale, remove it from the parameters so that we
* do not get an unneeded ?_locale= query string.
*
* @param SymfonyRoute $route The route being generated.
* @param SymfonyRoute $route The route being generated
* @param array $parameters The parameters used, will be modified to
* remove the _locale field if needed.
* remove the _locale field if needed
*/
protected function unsetLocaleIfNotNeeded(SymfonyRoute $route, array &$parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion ContentRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface ContentRepositoryInterface
*
* @param string $id id of the content object
*
* @return object A content that matches this id.
* @return object A content that matches this id
*/
public function findById($id);

Expand Down
4 changes: 2 additions & 2 deletions Enhancer/ConditionalEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class ConditionalEnhancer implements RouteEnhancerInterface
*
* The enhancer has to implement RouteEnhancerInterface.
*
* @var array Ordered list of 'matcher', 'enhancer' pairs.
* @var array Ordered list of 'matcher', 'enhancer' pairs
*/
private $enhancerMap;

/**
* @param array $enhancerMap Ordered list of 'matcher', 'enhancer' pairs.
* @param array $enhancerMap Ordered list of 'matcher', 'enhancer' pairs
*/
public function __construct(array $enhancerMap)
{
Expand Down
6 changes: 3 additions & 3 deletions Enhancer/RouteEnhancerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ interface RouteEnhancerInterface
/**
* Update the defaults based on its own data and the request.
*
* @param array $defaults the getRouteDefaults array.
* @param Request $request the Request instance.
* @param array $defaults the getRouteDefaults array
* @param Request $request the Request instance
*
* @return array the modified defaults. Each enhancer MUST return the
* $defaults but may add or remove values.
* $defaults but may add or remove values
*/
public function enhance(array $defaults, Request $request);
}
4 changes: 2 additions & 2 deletions NestedMatcher/FinalMatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ interface FinalMatcherInterface
/**
* Matches a request against a route collection and returns exactly one result.
*
* @param RouteCollection $collection The collection against which to match.
* @param Request $request The request to match.
* @param RouteCollection $collection The collection against which to match
* @param Request $request The request to match
*
* @return array An array of parameters
*
Expand Down
6 changes: 3 additions & 3 deletions NestedMatcher/NestedMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function __construct(
/**
* Sets the route provider for the matching plan.
*
* @param RouteProviderInterface $provider A source of routes.
* @param RouteProviderInterface $provider A source of routes
*
* @return NestedMatcher this object to have a fluent interface
*/
Expand All @@ -102,7 +102,7 @@ public function setRouteProvider(RouteProviderInterface $provider)
* @param RouteFilterInterface $filter
* @param int $priority (optional) The priority of the
* filter. Higher number filters will
* be used first. Defaults to 0.
* be used first. Defaults to 0
*
* @return NestedMatcher this object to have a fluent interface
*/
Expand All @@ -122,7 +122,7 @@ public function addRouteFilter(RouteFilterInterface $filter, $priority = 0)
* Sets the final matcher for the matching plan.
*
* @param FinalMatcherInterface $final The final matcher that will have to
* pick the route that will be used.
* pick the route that will be used
*
* @return NestedMatcher this object to have a fluent interface
*/
Expand Down
8 changes: 4 additions & 4 deletions NestedMatcher/RouteFilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ interface RouteFilterInterface
* Filters the route collection against a request and returns all matching
* routes.
*
* @param RouteCollection $collection The collection against which to match.
* @param Request $request A Request object against which to match.
* @param RouteCollection $collection The collection against which to match
* @param Request $request A Request object against which to match
*
* @return RouteCollection A non-empty RouteCollection of matched routes.
* @return RouteCollection A non-empty RouteCollection of matched routes
*
* @throws ResourceNotFoundException if none of the routes in $collection
* matches $request. This is a performance
* optimization to not continue the match
* process when a match will no longer be
* possible.
* possible
*/
public function filter(RouteCollection $collection, Request $request);
}
2 changes: 1 addition & 1 deletion PagedRouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function __construct(PagedRouteProviderInterface $pagedRouteProvider, $ro
/**
* Loads the next routes into the elements array.
*
* @param int $offset The offset used in the db query.
* @param int $offset The offset used in the db query
*/
protected function loadNextElements($offset)
{
Expand Down
6 changes: 3 additions & 3 deletions PagedRouteProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ interface PagedRouteProviderInterface extends RouteProviderInterface
* all routes at once.
*
* @param int $offset
* The sequence will start with that offset in the list of all routes.
* The sequence will start with that offset in the list of all routes
* @param int $length [optional]
* The sequence will have that many routes in it. If no length is
* specified all routes are returned.
* specified all routes are returned
*
* @return \Symfony\Component\Routing\Route[]
* Routes keyed by the route name.
* Routes keyed by the route name
*/
public function getRoutesPaged($offset, $length = null);

Expand Down
10 changes: 5 additions & 5 deletions RouteProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ interface RouteProviderInterface
* very large route sets to be filtered down to likely candidates, which
* may then be filtered in memory more completely.
*
* @param Request $request A request against which to match.
* @param Request $request A request against which to match
*
* @return RouteCollection with all Routes that could potentially match
* $request. Empty collection if nothing can match.
* $request. Empty collection if nothing can match
*/
public function getRouteCollectionForRequest(Request $request);

/**
* Find the route using the provided route name.
*
* @param string $name The route name to fetch.
* @param string $name The route name to fetch
*
* @return Route
*
Expand Down Expand Up @@ -79,10 +79,10 @@ public function getRouteByName($name);
* DynamicRouter::getRouteCollection() call.
*
* @param array|null $names The list of names to retrieve, In case of null,
* the provider will determine what routes to return.
* the provider will determine what routes to return
*
* @return Route[] Iterable list with the keys being the names from the
* $names array.
* $names array
*/
public function getRoutesByNames($names);
}