diff options
Diffstat (limited to 'Http/HttpUtils.php')
-rw-r--r-- | Http/HttpUtils.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php index 0453520..0c8b21b 100644 --- a/Http/HttpUtils.php +++ b/Http/HttpUtils.php @@ -35,7 +35,9 @@ class HttpUtils * Constructor. * * @param UrlGeneratorInterface $urlGenerator A UrlGeneratorInterface instance - * @param UrlMatcherInterface|RequestMatcherInterface $urlMatcher The Url or Request matcher + * @param UrlMatcherInterface|RequestMatcherInterface $urlMatcher The URL or Request matcher + * + * @throws \InvalidArgumentException */ public function __construct(UrlGeneratorInterface $urlGenerator = null, $urlMatcher = null) { @@ -53,7 +55,7 @@ class HttpUtils * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) * @param integer $status The status code * - * @return Response A RedirectResponse instance + * @return RedirectResponse A RedirectResponse instance */ public function createRedirectResponse(Request $request, $path, $status = 302) { @@ -122,9 +124,11 @@ class HttpUtils * Generates a URI, based on the given path or absolute URL. * * @param Request $request A Request instance - * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) + * @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo)) * * @return string An absolute URL + * + * @throws \LogicException */ public function generateUri($request, $path) { @@ -142,7 +146,7 @@ class HttpUtils $url = $this->urlGenerator->generate($path, $request->attributes->all(), UrlGeneratorInterface::ABSOLUTE_URL); - // unnecessary query string parameters must be removed from url + // unnecessary query string parameters must be removed from URL // (ie. query parameters that are presents in $attributes) // fortunately, they all are, so we have to remove entire query string $position = strpos($url, '?'); |