diff --git a/Enhancer/FieldByClassEnhancer.php b/Enhancer/FieldByClassEnhancer.php index 23bc714c..b0b8c5cd 100644 --- a/Enhancer/FieldByClassEnhancer.php +++ b/Enhancer/FieldByClassEnhancer.php @@ -4,8 +4,6 @@ use Symfony\Component\HttpFoundation\Request; -use Symfony\Cmf\Component\Routing\RouteObjectInterface; - /** * This enhancer sets a field if not yet existing from the class of an object * in another field. diff --git a/Enhancer/RouteContentEnhancer.php b/Enhancer/RouteContentEnhancer.php index da7ed915..c6f23566 100644 --- a/Enhancer/RouteContentEnhancer.php +++ b/Enhancer/RouteContentEnhancer.php @@ -2,13 +2,12 @@ namespace Symfony\Cmf\Component\Routing\Enhancer; -use Symfony\Component\Routing\Route; use Symfony\Component\HttpFoundation\Request; use Symfony\Cmf\Component\Routing\RouteObjectInterface; /** - * This enhancer sets the content to target field if the route provides content + * This enhancer sets the content to target field if the route provides content. * * Only works with RouteObjectInterface routes that can return a referenced * content. @@ -56,6 +55,7 @@ public function enhance(array $defaults, Request $request) // we can't determine the content return $defaults; } + /** @var $route RouteObjectInterface */ $route = $defaults[$this->routefield]; $content = $route->getContent(); diff --git a/Enhancer/RouteEnhancerInterface.php b/Enhancer/RouteEnhancerInterface.php index 5932c716..3746fcaf 100644 --- a/Enhancer/RouteEnhancerInterface.php +++ b/Enhancer/RouteEnhancerInterface.php @@ -2,7 +2,6 @@ namespace Symfony\Cmf\Component\Routing\Enhancer; -use Symfony\Component\Routing\Route; use Symfony\Component\HttpFoundation\Request; /** @@ -19,9 +18,10 @@ interface RouteEnhancerInterface /** * Update the defaults based on its own data and the request. * - * @param array $defaults the getRouteDefaults array + * @param array $defaults the getRouteDefaults array. * - * @return array the modified defaults. Each enhancer MUST return the $defaults but may add or remove values + * @return array the modified defaults. Each enhancer MUST return the + * $defaults but may add or remove values. */ public function enhance(array $defaults, Request $request); } diff --git a/NestedMatcher/NestedMatcher.php b/NestedMatcher/NestedMatcher.php index f2b50a3d..8b802727 100644 --- a/NestedMatcher/NestedMatcher.php +++ b/NestedMatcher/NestedMatcher.php @@ -5,7 +5,6 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; -use Symfony\Component\Routing\Route; use Symfony\Cmf\Component\Routing\RouteProviderInterface; /** @@ -55,7 +54,7 @@ class NestedMatcher implements RequestMatcherInterface /** * Constructs a new NestedMatcher * - * @param RouteProviderInterface $provider The Route Provider this matcher + * @param RouteProviderInterface $provider The route provider this matcher * should use * @param FinalMatcherInterface $final The Final Matcher to match the * routes @@ -135,7 +134,7 @@ public function matchRequest(Request $request) throw new ResourceNotFoundException(); } - // Route Filters are expected to throw an exception themselves if they + // Route filters are expected to throw an exception themselves if they // end up filtering the list down to 0. foreach ($this->getRouteFilters() as $filter) { $collection = $filter->filter($collection, $request);