From 7155dcbc30b2f66cd7706fc6d6e14b43c2a34252 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 30 Nov 2016 16:21:42 +0000 Subject: [PATCH] Apply fixes from StyleCI --- Candidates/Candidates.php | 16 ++++++++-------- Candidates/CandidatesInterface.php | 2 +- ChainRouter.php | 2 +- ChainRouterInterface.php | 4 ++-- ContentAwareGenerator.php | 12 ++++++------ ContentRepositoryInterface.php | 2 +- Enhancer/ConditionalEnhancer.php | 4 ++-- Enhancer/RouteEnhancerInterface.php | 6 +++--- NestedMatcher/FinalMatcherInterface.php | 4 ++-- NestedMatcher/NestedMatcher.php | 6 +++--- NestedMatcher/RouteFilterInterface.php | 8 ++++---- PagedRouteCollection.php | 2 +- PagedRouteProviderInterface.php | 6 +++--- RouteProviderInterface.php | 10 +++++----- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Candidates/Candidates.php b/Candidates/Candidates.php index 21bef551..057e66f8 100644 --- a/Candidates/Candidates.php +++ b/Candidates/Candidates.php @@ -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) { @@ -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) { @@ -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) { @@ -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 = '') { diff --git a/Candidates/CandidatesInterface.php b/Candidates/CandidatesInterface.php index 4ada3866..d66f060e 100644 --- a/Candidates/CandidatesInterface.php +++ b/Candidates/CandidatesInterface.php @@ -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); } diff --git a/ChainRouter.php b/ChainRouter.php index 670ea780..adad9d4c 100644 --- a/ChainRouter.php +++ b/ChainRouter.php @@ -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) { diff --git a/ChainRouterInterface.php b/ChainRouterInterface.php index 15763135..9f6d2f6e 100644 --- a/ChainRouterInterface.php +++ b/ChainRouterInterface.php @@ -25,7 +25,7 @@ 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); @@ -33,7 +33,7 @@ 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(); } diff --git a/ContentAwareGenerator.php b/ContentAwareGenerator.php index db26d8f6..fc3a32f2 100644 --- a/ContentAwareGenerator.php +++ b/ContentAwareGenerator.php @@ -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 */ @@ -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) { @@ -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) { @@ -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) { diff --git a/ContentRepositoryInterface.php b/ContentRepositoryInterface.php index 34f9b86f..83818024 100644 --- a/ContentRepositoryInterface.php +++ b/ContentRepositoryInterface.php @@ -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); diff --git a/Enhancer/ConditionalEnhancer.php b/Enhancer/ConditionalEnhancer.php index 333cee91..7d4d754c 100644 --- a/Enhancer/ConditionalEnhancer.php +++ b/Enhancer/ConditionalEnhancer.php @@ -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) { diff --git a/Enhancer/RouteEnhancerInterface.php b/Enhancer/RouteEnhancerInterface.php index fa4640d5..8598fd62 100644 --- a/Enhancer/RouteEnhancerInterface.php +++ b/Enhancer/RouteEnhancerInterface.php @@ -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); } diff --git a/NestedMatcher/FinalMatcherInterface.php b/NestedMatcher/FinalMatcherInterface.php index 074b3e0d..623169fc 100644 --- a/NestedMatcher/FinalMatcherInterface.php +++ b/NestedMatcher/FinalMatcherInterface.php @@ -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 * diff --git a/NestedMatcher/NestedMatcher.php b/NestedMatcher/NestedMatcher.php index cc68463d..d50484db 100644 --- a/NestedMatcher/NestedMatcher.php +++ b/NestedMatcher/NestedMatcher.php @@ -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 */ @@ -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 */ @@ -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 */ diff --git a/NestedMatcher/RouteFilterInterface.php b/NestedMatcher/RouteFilterInterface.php index 6f2ed72e..2c02ae5a 100644 --- a/NestedMatcher/RouteFilterInterface.php +++ b/NestedMatcher/RouteFilterInterface.php @@ -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); } diff --git a/PagedRouteCollection.php b/PagedRouteCollection.php index ae02b6e3..90e4a767 100644 --- a/PagedRouteCollection.php +++ b/PagedRouteCollection.php @@ -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) { diff --git a/PagedRouteProviderInterface.php b/PagedRouteProviderInterface.php index 32148e87..9a3f363b 100644 --- a/PagedRouteProviderInterface.php +++ b/PagedRouteProviderInterface.php @@ -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); diff --git a/RouteProviderInterface.php b/RouteProviderInterface.php index 49842b98..601430e5 100644 --- a/RouteProviderInterface.php +++ b/RouteProviderInterface.php @@ -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 * @@ -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); }