Passed
Push — master ( 2370ba...810673 )
by Anton
02:17
created
tests/Framework/Http/CookiesTest.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function testHasCookie(): void
37 37
     {
38
-        $this->http->setHandler(function () {
38
+        $this->http->setHandler(function (){
39 39
             return (int)$this->cookies()->has('a');
40 40
         });
41 41
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         ]);
54 54
         $this->http = $this->app->get(Http::class);
55 55
 
56
-        $this->http->setHandler(function () {
56
+        $this->http->setHandler(function (){
57 57
             return (int)$this->cookies()->has('a');
58 58
         });
59 59
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
71 71
         $this->http = $this->app->get(Http::class);
72 72
 
73
-        $this->http->setHandler(function () {
73
+        $this->http->setHandler(function (){
74 74
             return $this->cookies()->get('a');
75 75
         });
76 76
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
88 88
         $this->http = $this->app->get(Http::class);
89 89
 
90
-        $this->http->setHandler(function () {
90
+        $this->http->setHandler(function (){
91 91
             $this->cookies()->set('a', 'value');
92 92
 
93 93
             return 'ok';
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
112 112
         $this->http = $this->app->get(Http::class);
113 113
 
114
-        $this->http->setHandler(function () {
114
+        $this->http->setHandler(function (){
115 115
             $this->cookies()->schedule(Cookie::create('a', 'value'));
116 116
             $this->assertSame([], $this->cookies()->getAll());
117 117
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function testHasCookie(): void
37 37
     {
38
-        $this->http->setHandler(function () {
38
+        $this->http->setHandler(function ()
39
+        {
39 40
             return (int)$this->cookies()->has('a');
40 41
         });
41 42
 
@@ -53,7 +54,8 @@  discard block
 block discarded – undo
53 54
         ]);
54 55
         $this->http = $this->app->get(Http::class);
55 56
 
56
-        $this->http->setHandler(function () {
57
+        $this->http->setHandler(function ()
58
+        {
57 59
             return (int)$this->cookies()->has('a');
58 60
         });
59 61
 
@@ -70,7 +72,8 @@  discard block
 block discarded – undo
70 72
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
71 73
         $this->http = $this->app->get(Http::class);
72 74
 
73
-        $this->http->setHandler(function () {
75
+        $this->http->setHandler(function ()
76
+        {
74 77
             return $this->cookies()->get('a');
75 78
         });
76 79
 
@@ -87,7 +90,8 @@  discard block
 block discarded – undo
87 90
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
88 91
         $this->http = $this->app->get(Http::class);
89 92
 
90
-        $this->http->setHandler(function () {
93
+        $this->http->setHandler(function ()
94
+        {
91 95
             $this->cookies()->set('a', 'value');
92 96
 
93 97
             return 'ok';
@@ -111,7 +115,8 @@  discard block
 block discarded – undo
111 115
         $this->app = $this->makeApp(['ENCRYPTER_KEY' => $key]);
112 116
         $this->http = $this->app->get(Http::class);
113 117
 
114
-        $this->http->setHandler(function () {
118
+        $this->http->setHandler(function ()
119
+        {
115 120
             $this->cookies()->schedule(Cookie::create('a', 'value'));
116 121
             $this->assertSame([], $this->cookies()->getAll());
117 122
 
Please login to merge, or discard this patch.
src/Bootloader/Http/SessionBootloader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             'handler'  => new Autowire(
67 67
                 FileHandler::class,
68 68
                 [
69
-                    'directory' => $directories->get('runtime') . 'session',
69
+                    'directory' => $directories->get('runtime').'session',
70 70
                     'lifetime'  => 86400
71 71
                 ]
72 72
             )
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     private function session(ServerRequestInterface $request): SessionInterface
86 86
     {
87 87
         $session = $request->getAttribute(SessionMiddleware::ATTRIBUTE, null);
88
-        if ($session === null) {
88
+        if ($session === null){
89 89
             throw new ScopeException('Unable to resolve Session, invalid request scope');
90 90
         }
91 91
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,8 @@
 block discarded – undo
85 85
     private function session(ServerRequestInterface $request): SessionInterface
86 86
     {
87 87
         $session = $request->getAttribute(SessionMiddleware::ATTRIBUTE, null);
88
-        if ($session === null) {
88
+        if ($session === null)
89
+        {
89 90
             throw new ScopeException('Unable to resolve Session, invalid request scope');
90 91
         }
91 92
 
Please login to merge, or discard this patch.