From 974f45e4e8529cc56757229d460af65c290dad1a Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 28 Dec 2016 22:51:03 +0100 Subject: [PATCH] Remove unnecessary parameters --- src/Http/CookieFactory.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/Http/CookieFactory.php b/src/Http/CookieFactory.php index b92d79153..9ed57787c 100644 --- a/src/Http/CookieFactory.php +++ b/src/Http/CookieFactory.php @@ -35,29 +35,21 @@ class CookieFactory * @param string $name * @param string $value * @param int $maxAge - * @param string $path - * @param bool $secure - * @param bool $httpOnly - * @param string $domain * @return \Dflydev\FigCookies\SetCookie */ - public function make($name, $value = null, $maxAge = null, $path = null, $secure = null, $httpOnly = true, $domain = null) + public function make($name, $value = null, $maxAge = null) { $url = parse_url(rtrim($this->app->url(), '/')); - if ($path === null) { - $path = array_get($url, 'path') ?: '/'; - } + $path = array_get($url, 'path') ?: '/'; - if ($secure === null && array_get($url, 'scheme') === 'https') { - $secure = true; - } + $secure = array_get($url, 'scheme') === 'https'; return SetCookie::create($name, $value) ->withMaxAge($maxAge) ->withPath($path) ->withSecure($secure) - ->withHttpOnly($httpOnly) - ->withDomain($domain); + ->withHttpOnly(true) + ->withDomain(null); } }