Completed
Pull Request — master (#11)
by Joao
04:29
created
src/JwtSession.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * JwtSession constructor.
19 19
      *
20
-     * @param $sessionConfig
20
+     * @param SessionConfig $sessionConfig
21 21
      * @throws JwtSessionException
22 22
      */
23 23
     public function __construct($sessionConfig)
@@ -36,7 +36,6 @@  discard block
 block discarded – undo
36 36
     }
37 37
 
38 38
     /**
39
-     * @param bool $startSession
40 39
      * @throws JwtSessionException
41 40
      */
42 41
     protected function replaceSessionHandler()
Please login to merge, or discard this 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
             setcookie(
86 86
                 self::COOKIE_PREFIX . $this->sessionConfig->getSessionContext(),
87 87
                 null,
88
-                (time()-3000),
88
+                (time() - 3000),
89 89
                 $this->sessionConfig->getCookiePath(),
90 90
                 $this->sessionConfig->getCookieDomain()
91 91
             );
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             setcookie(
197 197
                 self::COOKIE_PREFIX . $this->sessionConfig->getSessionContext(),
198 198
                 $token,
199
-                (time()+$this->sessionConfig->getTimeoutMinutes()*60) ,
199
+                (time() + $this->sessionConfig->getTimeoutMinutes() * 60),
200 200
                 $this->sessionConfig->getCookiePath(),
201 201
                 $this->sessionConfig->getCookieDomain(),
202 202
                 false,
Please login to merge, or discard this patch.
src/SessionConfig.php 1 patch
Doc Comments   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     /**
21 21
      * SessionConfig constructor.
22
-     * @param $serverName
22
+     * @param string $serverName
23 23
      */
24 24
     public function __construct($serverName)
25 25
     {
@@ -47,11 +47,18 @@  discard block
 block discarded – undo
47 47
         return $this;
48 48
     }
49 49
 
50
+    /**
51
+     * @param string $secret
52
+     */
50 53
     public function withSecret($secret) {
51 54
         $this->jwtKey = new JwtKeySecret($secret);
52 55
         return $this;
53 56
     }
54 57
     
58
+    /**
59
+     * @param string $private
60
+     * @param string $public
61
+     */
55 62
     public function withRsaSecret($private, $public) {
56 63
         $this->jwtKey = new JwtRsaKey($private, $public);
57 64
         return $this;
@@ -63,7 +70,7 @@  discard block
 block discarded – undo
63 70
     }
64 71
 
65 72
     /**
66
-     * @return mixed
73
+     * @return string
67 74
      */
68 75
     public function getServerName()
69 76
     {
@@ -87,7 +94,7 @@  discard block
 block discarded – undo
87 94
     }
88 95
 
89 96
     /**
90
-     * @return null
97
+     * @return string|null
91 98
      */
92 99
     public function getCookieDomain()
93 100
     {
Please login to merge, or discard this patch.