Completed
Branch main (f0399c)
by Beau
03:05 queued 59s
created
src/Dflydev/FigCookies/SetCookie.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -149,6 +149,9 @@
 block discarded – undo
149 149
         return $this->withExpires(new DateTime('-5 years'));
150 150
     }
151 151
 
152
+    /**
153
+     * @param integer $maxAge
154
+     */
152 155
     public function withMaxAge(?int $maxAge = null): self
153 156
     {
154 157
         $clone = clone $this;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $time = strtotime($expires);
122 122
 
123
-        if (! is_int($time)) {
123
+        if (!is_int($time)) {
124 124
             throw new InvalidArgumentException(sprintf('Invalid expires "%s" provided', $expires));
125 125
         }
126 126
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public function __toString(): string
216 216
     {
217 217
         $cookieStringParts = [
218
-            urlencode($this->name) . '=' . urlencode((string) $this->value),
218
+            urlencode($this->name).'='.urlencode((string) $this->value),
219 219
         ];
220 220
 
221 221
         $cookieStringParts = $this->appendFormattedDomainPartIfSet($cookieStringParts);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
         $rawAttribute = array_shift($rawAttributes);
252 252
 
253
-        if (! is_string($rawAttribute)) {
253
+        if (!is_string($rawAttribute)) {
254 254
             throw new InvalidArgumentException(sprintf(
255 255
                 'The provided cookie string "%s" must have at least one attribute',
256 256
                 $string
Please login to merge, or discard this patch.
src/Dflydev/FigCookies/Modifier/SameSite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,6 +68,6 @@
 block discarded – undo
68 68
 
69 69
     public function asString(): string
70 70
     {
71
-        return 'SameSite=' . $this->value;
71
+        return 'SameSite='.$this->value;
72 72
     }
73 73
 }
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
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
     public static function modify(ResponseInterface $response, string $name, callable $modify): ResponseInterface
39 39
     {
40
-        if (! is_callable($modify)) {
40
+        if (!is_callable($modify)) {
41 41
             throw new InvalidArgumentException('$modify must be callable.');
42 42
         }
43 43
 
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function __toString(): string
47 47
     {
48
-        return urlencode($this->name) . '=' . urlencode((string) $this->value);
48
+        return urlencode($this->name).'='.urlencode((string) $this->value);
49 49
     }
50 50
 
51 51
     /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $cookies = StringUtil::splitOnAttributeDelimiter($string);
67 67
 
68
-        return array_map(static function ($cookiePair) {
68
+        return array_map(static function($cookiePair) {
69 69
             return static::oneFromCookiePair($cookiePair);
70 70
         }, $cookies);
71 71
     }
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function get(string $name): ?Cookie
36 36
     {
37
-        if (! $this->has($name)) {
37
+        if (!$this->has($name)) {
38 38
             return null;
39 39
         }
40 40
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $clone = clone $this;
62 62
 
63
-        if (! $clone->has($name)) {
63
+        if (!$clone->has($name)) {
64 64
             return $clone;
65 65
         }
66 66
 
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
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     public static function modify(RequestInterface $request, string $name, callable $modify): RequestInterface
34 34
     {
35
-        if (! is_callable($modify)) {
35
+        if (!is_callable($modify)) {
36 36
             throw new InvalidArgumentException('$modify must be callable.');
37 37
         }
38 38
 
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function get(string $name): ?SetCookie
36 36
     {
37
-        if (! $this->has($name)) {
37
+        if (!$this->has($name)) {
38 38
             return null;
39 39
         }
40 40
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $clone = clone $this;
62 62
 
63
-        if (! $clone->has($name)) {
63
+        if (!$clone->has($name)) {
64 64
             return $clone;
65 65
         }
66 66
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public static function fromSetCookieStrings(array $setCookieStrings): self
91 91
     {
92
-        return new static(array_map(static function (string $setCookieString): SetCookie {
92
+        return new static(array_map(static function(string $setCookieString): SetCookie {
93 93
             return SetCookie::fromSetCookieString($setCookieString);
94 94
         }, $setCookieStrings));
95 95
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public static function fromResponse(ResponseInterface $response): SetCookies
101 101
     {
102
-        return new static(array_map(static function (string $setCookieString): SetCookie {
102
+        return new static(array_map(static function(string $setCookieString): SetCookie {
103 103
             return SetCookie::fromSetCookieString($setCookieString);
104 104
         }, $response->getHeader(static::SET_COOKIE_HEADER)));
105 105
     }
Please login to merge, or discard this patch.