Passed
Push — v6 ( 0ec70f...32f4f3 )
by 光春
03:48
created
src/facade/Pregs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/Dates.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/Requests.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/UnIqIds.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/Xmls.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/Returns.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/facade/Times.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18 18
 // +----------------------------------------------------------------------
19 19
 
20
-declare (strict_types=1);
20
+declare(strict_types=1);
21 21
 
22 22
 namespace DtApp\ThinkLibrary\facade;
23 23
 
Please login to merge, or discard this patch.
src/common.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         if (empty($ip)) {
40 40
             if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
41 41
                 $ip = $_SERVER['REMOTE_ADDR'];
42
-            } else {
42
+            }else {
43 43
                 //为了兼容百度的CDN,所以转成数组
44 44
                 $arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
45 45
                 $ip = $arr[0];
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             $myc->name($name)
106 106
                 ->expire($expire)
107 107
                 ->set($value);
108
-        } else {
108
+        }else {
109 109
             $myc->name($name)
110 110
                 ->expire($expire)
111 111
                 ->update($value);
Please login to merge, or discard this patch.
src/session/Mysql.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function read(string $sessionId): string
55 55
     {
56 56
         return (string)Db::table($this->table_name)
57
-            ->where('session_id', $this->config['session_prefix'] . $sessionId)
57
+            ->where('session_id', $this->config['session_prefix'].$sessionId)
58 58
             ->whereTime('session_expire', '>=', time())
59 59
             ->order('session_expire desc')
60 60
             ->value('session_data', '');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function delete(string $sessionId): bool
70 70
     {
71 71
         $result = Db::table($this->table_name)
72
-            ->where('session_id', $this->config['session_prefix'] . $sessionId)
72
+            ->where('session_id', $this->config['session_prefix'].$sessionId)
73 73
             ->delete();
74 74
         return $result ? true : false;
75 75
     }
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
     public function write(string $sessionId, string $data): bool
87 87
     {
88 88
         $get = Db::table($this->table_name)
89
-            ->where('session_id', $this->config['session_prefix'] . $sessionId)
89
+            ->where('session_id', $this->config['session_prefix'].$sessionId)
90 90
             ->whereTime('session_expire', '>=', time())
91 91
             ->field('id')
92 92
             ->find();
93 93
         if (empty($get)) {
94 94
             $params = [
95
-                'session_id' => $this->config['session_prefix'] . $sessionId,
95
+                'session_id' => $this->config['session_prefix'].$sessionId,
96 96
                 'session_expire' => Times::dateRear("Y-m-d H:i:s", $this->config['session_expire']),
97 97
                 'session_data' => $data
98 98
             ];
Please login to merge, or discard this patch.