Passed
Push — master ( 13c7a9...8fcc0e )
by Christoph
15:42 queued 11s
created
lib/private/Http/CookieHelper.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -28,50 +28,50 @@
 block discarded – undo
28 28
 namespace OC\Http;
29 29
 
30 30
 class CookieHelper {
31
-	public const SAMESITE_NONE = 0;
32
-	public const SAMESITE_LAX = 1;
33
-	public const SAMESITE_STRICT = 2;
31
+    public const SAMESITE_NONE = 0;
32
+    public const SAMESITE_LAX = 1;
33
+    public const SAMESITE_STRICT = 2;
34 34
 
35
-	public static function setCookie(string $name,
36
-									 string $value = '',
37
-									 int $maxAge = 0,
38
-									 string $path = '',
39
-									 string $domain = '',
40
-									 bool $secure = false,
41
-									 bool $httponly = false,
42
-									 int $samesite = self::SAMESITE_NONE) {
43
-		$header = sprintf(
44
-			'Set-Cookie: %s=%s',
45
-			$name,
46
-			rawurlencode($value)
47
-		);
35
+    public static function setCookie(string $name,
36
+                                        string $value = '',
37
+                                        int $maxAge = 0,
38
+                                        string $path = '',
39
+                                        string $domain = '',
40
+                                        bool $secure = false,
41
+                                        bool $httponly = false,
42
+                                        int $samesite = self::SAMESITE_NONE) {
43
+        $header = sprintf(
44
+            'Set-Cookie: %s=%s',
45
+            $name,
46
+            rawurlencode($value)
47
+        );
48 48
 
49
-		if ($path !== '') {
50
-			$header .= sprintf('; Path=%s', $path);
51
-		}
49
+        if ($path !== '') {
50
+            $header .= sprintf('; Path=%s', $path);
51
+        }
52 52
 
53
-		if ($domain !== '') {
54
-			$header .= sprintf('; Domain=%s', $domain);
55
-		}
53
+        if ($domain !== '') {
54
+            $header .= sprintf('; Domain=%s', $domain);
55
+        }
56 56
 
57
-		if ($maxAge > 0) {
58
-			$header .= sprintf('; Max-Age=%d', $maxAge);
59
-		}
57
+        if ($maxAge > 0) {
58
+            $header .= sprintf('; Max-Age=%d', $maxAge);
59
+        }
60 60
 
61
-		if ($secure) {
62
-			$header .= '; Secure';
63
-		}
61
+        if ($secure) {
62
+            $header .= '; Secure';
63
+        }
64 64
 
65
-		if ($httponly) {
66
-			$header .= '; HttpOnly';
67
-		}
65
+        if ($httponly) {
66
+            $header .= '; HttpOnly';
67
+        }
68 68
 
69
-		if ($samesite === self::SAMESITE_LAX) {
70
-			$header .= '; SameSite=Lax';
71
-		} elseif ($samesite === self::SAMESITE_STRICT) {
72
-			$header .= '; SameSite=Strict';
73
-		}
69
+        if ($samesite === self::SAMESITE_LAX) {
70
+            $header .= '; SameSite=Lax';
71
+        } elseif ($samesite === self::SAMESITE_STRICT) {
72
+            $header .= '; SameSite=Strict';
73
+        }
74 74
 
75
-		header($header, false);
76
-	}
75
+        header($header, false);
76
+    }
77 77
 }
Please login to merge, or discard this patch.