Completed
Pull Request — master (#27)
by Will
01:23
created
src/Store/BaseStore.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -8,56 +8,56 @@
 block discarded – undo
8 8
 
9 9
 abstract class BaseStore implements SessionHandlerInterface
10 10
 {
11
-    use Configurable;
12
-
13
-    /**
14
-     * Session secret key
15
-     *
16
-     * @var string
17
-     */
18
-    protected $key = null;
19
-
20
-    /**
21
-     * Assign a new session secret key
22
-     *
23
-     * @param string $key
24
-     */
25
-    public function setKey($key)
26
-    {
27
-        $this->key = $key;
28
-    }
29
-
30
-    /**
31
-     * Get the session secret key
32
-     *
33
-     * @return string
34
-     */
35
-    protected function getKey()
36
-    {
37
-        return $this->key;
38
-    }
39
-
40
-    /**
41
-     * Get lifetime in number of seconds
42
-     *
43
-     * @return int
44
-     */
45
-    protected function getLifetime()
46
-    {
47
-        $params = session_get_cookie_params();
48
-        $cookieLifetime = (int)$params['lifetime'];
49
-        $gcLifetime = (int)ini_get('session.gc_maxlifetime');
50
-
51
-        return $cookieLifetime ? min($cookieLifetime, $gcLifetime) : $gcLifetime;
52
-    }
53
-
54
-    /**
55
-     * Gets the current unix timestamp
56
-     *
57
-     * @return int
58
-     */
59
-    protected function getNow()
60
-    {
61
-        return (int) DBDatetime::now()->getTimestamp();
62
-    }
11
+	use Configurable;
12
+
13
+	/**
14
+	 * Session secret key
15
+	 *
16
+	 * @var string
17
+	 */
18
+	protected $key = null;
19
+
20
+	/**
21
+	 * Assign a new session secret key
22
+	 *
23
+	 * @param string $key
24
+	 */
25
+	public function setKey($key)
26
+	{
27
+		$this->key = $key;
28
+	}
29
+
30
+	/**
31
+	 * Get the session secret key
32
+	 *
33
+	 * @return string
34
+	 */
35
+	protected function getKey()
36
+	{
37
+		return $this->key;
38
+	}
39
+
40
+	/**
41
+	 * Get lifetime in number of seconds
42
+	 *
43
+	 * @return int
44
+	 */
45
+	protected function getLifetime()
46
+	{
47
+		$params = session_get_cookie_params();
48
+		$cookieLifetime = (int)$params['lifetime'];
49
+		$gcLifetime = (int)ini_get('session.gc_maxlifetime');
50
+
51
+		return $cookieLifetime ? min($cookieLifetime, $gcLifetime) : $gcLifetime;
52
+	}
53
+
54
+	/**
55
+	 * Gets the current unix timestamp
56
+	 *
57
+	 * @return int
58
+	 */
59
+	protected function getNow()
60
+	{
61
+		return (int) DBDatetime::now()->getTimestamp();
62
+	}
63 63
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
     protected function getLifetime()
46 46
     {
47 47
         $params = session_get_cookie_params();
48
-        $cookieLifetime = (int)$params['lifetime'];
49
-        $gcLifetime = (int)ini_get('session.gc_maxlifetime');
48
+        $cookieLifetime = (int) $params['lifetime'];
49
+        $gcLifetime = (int) ini_get('session.gc_maxlifetime');
50 50
 
51 51
         return $cookieLifetime ? min($cookieLifetime, $gcLifetime) : $gcLifetime;
52 52
     }
Please login to merge, or discard this patch.
src/Model/HybridSessionDataObject.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
 
7 7
 class HybridSessionDataObject extends DataObject
8 8
 {
9
-    private static $db = [
10
-        'SessionID' => 'Varchar(64)',
11
-        'Expiry' => 'Int',
12
-        'Data' => 'Text'
13
-    ];
9
+	private static $db = [
10
+		'SessionID' => 'Varchar(64)',
11
+		'Expiry' => 'Int',
12
+		'Data' => 'Text'
13
+	];
14 14
 
15
-    private static $indexes = [
16
-        'SessionID' => [
17
-            'type' => 'unique'
18
-        ],
19
-        'Expiry' => true
20
-    ];
15
+	private static $indexes = [
16
+		'SessionID' => [
17
+			'type' => 'unique'
18
+		],
19
+		'Expiry' => true
20
+	];
21 21
 
22
-    private static $table_name = 'HybridSessionDataObject';
22
+	private static $table_name = 'HybridSessionDataObject';
23 23
 }
Please login to merge, or discard this patch.
src/Crypto/CryptoHandler.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,27 +5,27 @@
 block discarded – undo
5 5
 interface CryptoHandler
6 6
 {
7 7
 
8
-    /**
9
-     * @param string $data
10
-     *
11
-     * @return string
12
-     */
13
-    public function encrypt($data);
8
+	/**
9
+	 * @param string $data
10
+	 *
11
+	 * @return string
12
+	 */
13
+	public function encrypt($data);
14 14
 
15
-    /**
16
-     * @param string $data
17
-     *
18
-     * @return string
19
-     */
20
-    public function decrypt($data);
15
+	/**
16
+	 * @param string $data
17
+	 *
18
+	 * @return string
19
+	 */
20
+	public function decrypt($data);
21 21
 
22
-    /**
23
-     * @return string
24
-     */
25
-    public function getKey();
22
+	/**
23
+	 * @return string
24
+	 */
25
+	public function getKey();
26 26
 
27
-    /**
28
-     * @return string
29
-     */
30
-    public function getSalt();
27
+	/**
28
+	 * @return string
29
+	 */
30
+	public function getSalt();
31 31
 }
Please login to merge, or discard this patch.
src/Control/HybridSessionMiddleware.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@
 block discarded – undo
8 8
 
9 9
 class HybridSessionMiddleware implements HTTPMiddleware
10 10
 {
11
-    public function process(HTTPRequest $request, callable $delegate)
12
-    {
13
-        try {
14
-            $request->getSession()->init($request);
11
+	public function process(HTTPRequest $request, callable $delegate)
12
+	{
13
+		try {
14
+			$request->getSession()->init($request);
15 15
 
16
-            return $delegate($request);
17
-        } finally {
18
-            $request->getSession()->save($request);
16
+			return $delegate($request);
17
+		} finally {
18
+			$request->getSession()->save($request);
19 19
 
20
-            session_write_close();
21
-        }
22
-    }
20
+			session_write_close();
21
+		}
22
+	}
23 23
 }
Please login to merge, or discard this patch.