Completed
Pull Request — master (#7)
by
unknown
06:44
created
src/Dflydev/FigCookies/SetCookie.php 2 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -126,6 +126,9 @@  discard block
 block discarded – undo
126 126
         return $clone;
127 127
     }
128 128
 
129
+    /**
130
+     * @param boolean $secure
131
+     */
129 132
     public function withSecure($secure = null)
130 133
     {
131 134
         $clone = clone($this);
@@ -135,6 +138,9 @@  discard block
 block discarded – undo
135 138
         return $clone;
136 139
     }
137 140
 
141
+    /**
142
+     * @param boolean $httpOnly
143
+     */
138 144
     public function withHttpOnly($httpOnly = null)
139 145
     {
140 146
         $clone = clone($this);
@@ -160,6 +166,10 @@  discard block
 block discarded – undo
160 166
         return implode('; ', $cookieStringParts);
161 167
     }
162 168
 
169
+    /**
170
+     * @param string $name
171
+     * @param string $value
172
+     */
163 173
     public static function create($name, $value = null)
164 174
     {
165 175
         return new static($name, $value);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         /** @var SetCookie $setCookie */
175 175
         $setCookie = new static($cookieName);
176 176
 
177
-        if (! is_null($cookieValue)) {
177
+        if (!is_null($cookieValue)) {
178 178
             $setCookie = $setCookie->withValue($cookieValue);
179 179
         }
180 180
 
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/SetCookies.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function get($name)
43 43
     {
44
-        if (! $this->has($name)) {
44
+        if (!$this->has($name)) {
45 45
             return null;
46 46
         }
47 47
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $clone = clone($this);
79 79
 
80
-        if (! $clone->has($name)) {
80
+        if (!$clone->has($name)) {
81 81
             return $clone;
82 82
         }
83 83
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public static function fromSetCookieStrings($setCookieStrings)
112 112
     {
113
-        return new static(array_map(function ($setCookieString) {
113
+        return new static(array_map(function($setCookieString) {
114 114
             return SetCookie::fromSetCookieString($setCookieString);
115 115
         }, $setCookieStrings));
116 116
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public static function fromResponse(ResponseInterface $response)
125 125
     {
126
-        return new static(array_map(function ($setCookieString) {
126
+        return new static(array_map(function($setCookieString) {
127 127
             return SetCookie::fromSetCookieString($setCookieString);
128 128
         }, $response->getHeader(static::SET_COOKIE_HEADER)));
129 129
     }
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/FigResponseCookies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public static function modify(ResponseInterface $response, $name, $modify)
49 49
     {
50
-        if (! is_callable($modify)) {
50
+        if (!is_callable($modify)) {
51 51
             throw new InvalidArgumentException('$modify must be callable.');
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/StringUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             $pairParts[1] = '';
18 18
         }
19 19
 
20
-        return array_map(function ($part) {
20
+        return array_map(function($part) {
21 21
             return urldecode($part);
22 22
         }, $pairParts);
23 23
     }
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/Cookie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $cookies = StringUtil::splitOnAttributeDelimiter($string);
87 87
 
88
-        return array_map(function ($cookiePair) {
88
+        return array_map(function($cookiePair) {
89 89
             return static::oneFromCookiePair($cookiePair);
90 90
         }, $cookies);
91 91
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         /** @var Cookie $cookie */
104 104
         $cookie = new static($cookieName);
105 105
 
106
-        if (! is_null($cookieValue)) {
106
+        if (!is_null($cookieValue)) {
107 107
             $cookie = $cookie->withValue($cookieValue);
108 108
         }
109 109
 
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/Cookies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function get($name)
43 43
     {
44
-        if (! $this->has($name)) {
44
+        if (!$this->has($name)) {
45 45
             return null;
46 46
         }
47 47
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $clone = clone($this);
79 79
 
80
-        if (! $clone->has($name)) {
80
+        if (!$clone->has($name)) {
81 81
             return $clone;
82 82
         }
83 83
 
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/FigRequestCookies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public static function modify(RequestInterface $request, $name, $modify)
49 49
     {
50
-        if (! is_callable($modify)) {
50
+        if (!is_callable($modify)) {
51 51
             throw new InvalidArgumentException('$modify must be callable.');
52 52
         }
53 53
 
Please login to merge, or discard this patch.