Passed
Push — 5.1 ( 4abe34...5f0d26 )
by liu
17:41 queued 03:58
created
library/think/db/connector/Sqlsrv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
      */
39 39
     protected function parseDsn($config)
40 40
     {
41
-        $dsn = 'sqlsrv:Database=' . $config['database'] . ';Server=' . $config['hostname'];
41
+        $dsn = 'sqlsrv:Database='.$config['database'].';Server='.$config['hostname'];
42 42
 
43 43
         if (!empty($config['hostport'])) {
44
-            $dsn .= ',' . $config['hostport'];
44
+            $dsn .= ','.$config['hostport'];
45 45
         }
46 46
 
47 47
         return $dsn;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         if (is_null($field)) {
161 161
             $field = '*';
162 162
         } elseif ($key && '*' != $field) {
163
-            $field = $key . ',' . $field;
163
+            $field = $key.','.$field;
164 164
         }
165 165
 
166 166
         if (is_string($field)) {
Please login to merge, or discard this patch.
library/think/db/connector/Sqlite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected function parseDsn($config)
32 32
     {
33
-        $dsn = 'sqlite:' . $config['database'];
33
+        $dsn = 'sqlite:'.$config['database'];
34 34
 
35 35
         return $dsn;
36 36
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function getFields($tableName)
45 45
     {
46 46
         list($tableName) = explode(' ', $tableName);
47
-        $sql             = 'PRAGMA table_info( ' . $tableName . ' )';
47
+        $sql             = 'PRAGMA table_info( '.$tableName.' )';
48 48
 
49 49
         $pdo    = $this->query($sql, [], false, true);
50 50
         $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
Please login to merge, or discard this patch.
library/think/db/connector/Mysql.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     protected function initialize()
32 32
     {
33 33
         // Point类型支持
34
-        Query::extend('point', function ($query, $field, $value = null, $fun = 'GeomFromText', $type = 'POINT') {
34
+        Query::extend('point', function($query, $field, $value = null, $fun = 'GeomFromText', $type = 'POINT') {
35 35
             if (!is_null($value)) {
36 36
                 $query->data($field, ['point', $value, $fun, $type]);
37 37
             } else {
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
     protected function parseDsn($config)
55 55
     {
56 56
         if (!empty($config['socket'])) {
57
-            $dsn = 'mysql:unix_socket=' . $config['socket'];
57
+            $dsn = 'mysql:unix_socket='.$config['socket'];
58 58
         } elseif (!empty($config['hostport'])) {
59
-            $dsn = 'mysql:host=' . $config['hostname'] . ';port=' . $config['hostport'];
59
+            $dsn = 'mysql:host='.$config['hostname'].';port='.$config['hostport'];
60 60
         } else {
61
-            $dsn = 'mysql:host=' . $config['hostname'];
61
+            $dsn = 'mysql:host='.$config['hostname'];
62 62
         }
63
-        $dsn .= ';dbname=' . $config['database'];
63
+        $dsn .= ';dbname='.$config['database'];
64 64
 
65 65
         if (!empty($config['charset'])) {
66
-            $dsn .= ';charset=' . $config['charset'];
66
+            $dsn .= ';charset='.$config['charset'];
67 67
         }
68 68
 
69 69
         return $dsn;
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
             if (strpos($tableName, '.')) {
84 84
                 $tableName = str_replace('.', '`.`', $tableName);
85 85
             }
86
-            $tableName = '`' . $tableName . '`';
86
+            $tableName = '`'.$tableName.'`';
87 87
         }
88 88
 
89
-        $sql    = 'SHOW COLUMNS FROM ' . $tableName;
89
+        $sql    = 'SHOW COLUMNS FROM '.$tableName;
90 90
         $pdo    = $this->query($sql, [], false, true);
91 91
         $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
92 92
         $info   = [];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getTables($dbName = '')
118 118
     {
119
-        $sql    = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES ';
119
+        $sql    = !empty($dbName) ? 'SHOW TABLES FROM '.$dbName : 'SHOW TABLES ';
120 120
         $pdo    = $this->query($sql, [], false, true);
121 121
         $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
122 122
         $info   = [];
@@ -136,13 +136,13 @@  discard block
 block discarded – undo
136 136
      */
137 137
     protected function getExplain($sql)
138 138
     {
139
-        $pdo    = $this->linkID->query("EXPLAIN " . $sql);
139
+        $pdo    = $this->linkID->query("EXPLAIN ".$sql);
140 140
         $result = $pdo->fetch(PDO::FETCH_ASSOC);
141 141
         $result = array_change_key_case($result);
142 142
 
143 143
         if (isset($result['extra'])) {
144 144
             if (strpos($result['extra'], 'filesort') || strpos($result['extra'], 'temporary')) {
145
-                $this->log('SQL:' . $this->queryStr . '[' . $result['extra'] . ']', 'warn');
145
+                $this->log('SQL:'.$this->queryStr.'['.$result['extra'].']', 'warn');
146 146
             }
147 147
         }
148 148
 
Please login to merge, or discard this patch.
library/think/db/connector/Pgsql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
      */
38 38
     protected function parseDsn($config)
39 39
     {
40
-        $dsn = 'pgsql:dbname=' . $config['database'] . ';host=' . $config['hostname'];
40
+        $dsn = 'pgsql:dbname='.$config['database'].';host='.$config['hostname'];
41 41
 
42 42
         if (!empty($config['hostport'])) {
43
-            $dsn .= ';port=' . $config['hostport'];
43
+            $dsn .= ';port='.$config['hostport'];
44 44
         }
45 45
 
46 46
         return $dsn;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function getFields($tableName)
56 56
     {
57 57
         list($tableName) = explode(' ', $tableName);
58
-        $sql             = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\'' . $tableName . '\');';
58
+        $sql             = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\''.$tableName.'\');';
59 59
 
60 60
         $pdo    = $this->query($sql, [], false, true);
61 61
         $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
Please login to merge, or discard this patch.
library/think/Debug.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function getThroughputRate()
111 111
     {
112
-        return number_format(1 / $this->getUseTime(), 2) . 'req/s';
112
+        return number_format(1 / $this->getUseTime(), 2).'req/s';
113 113
     }
114 114
 
115 115
     /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             $pos++;
136 136
         }
137 137
 
138
-        return round($size, $dec) . " " . $a[$pos];
138
+        return round($size, $dec)." ".$a[$pos];
139 139
     }
140 140
 
141 141
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $pos++;
156 156
         }
157 157
 
158
-        return round($size, $dec) . " " . $a[$pos];
158
+        return round($size, $dec)." ".$a[$pos];
159 159
     }
160 160
 
161 161
     /**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $pos++;
182 182
         }
183 183
 
184
-        return round($size, $dec) . " " . $a[$pos];
184
+        return round($size, $dec)." ".$a[$pos];
185 185
     }
186 186
 
187 187
     /**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             $info  = [];
198 198
 
199 199
             foreach ($files as $key => $file) {
200
-                $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )';
200
+                $info[] = $file.' ( '.number_format(filesize($file) / 1024, 2).' KB )';
201 201
             }
202 202
 
203 203
             return $info;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function dump($var, $echo = true, $label = null, $flags = ENT_SUBSTITUTE)
219 219
     {
220
-        $label = (null === $label) ? '' : rtrim($label) . ':';
220
+        $label = (null === $label) ? '' : rtrim($label).':';
221 221
         if ($var instanceof Model || $var instanceof ModelCollection) {
222 222
             $var = $var->toArray();
223 223
         }
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
         $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', $output);
230 230
 
231 231
         if (PHP_SAPI == 'cli') {
232
-            $output = PHP_EOL . $label . $output . PHP_EOL;
232
+            $output = PHP_EOL.$label.$output.PHP_EOL;
233 233
         } else {
234 234
             if (!extension_loaded('xdebug')) {
235 235
                 $output = htmlspecialchars($output, $flags);
236 236
             }
237
-            $output = '<pre>' . $label . $output . '</pre>';
237
+            $output = '<pre>'.$label.$output.'</pre>';
238 238
         }
239 239
         if ($echo) {
240 240
             echo($output);
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
                 // trace调试信息注入
261 261
                 $pos = strripos($content, '</body>');
262 262
                 if (false !== $pos) {
263
-                    $content = substr($content, 0, $pos) . $output . substr($content, $pos);
263
+                    $content = substr($content, 0, $pos).$output.substr($content, $pos);
264 264
                 } else {
265
-                    $content = $content . $output;
265
+                    $content = $content.$output;
266 266
                 }
267 267
             }
268 268
         }
Please login to merge, or discard this patch.
library/think/Config.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
     {
118 118
         if (is_file($file)) {
119 119
             $filename = $file;
120
-        } elseif (is_file($this->path . $file . $this->ext)) {
121
-            $filename = $this->path . $file . $this->ext;
120
+        } elseif (is_file($this->path.$file.$this->ext)) {
121
+            $filename = $this->path.$file.$this->ext;
122 122
         }
123 123
 
124 124
         if (isset($filename)) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     protected function getYaconfName($name)
140 140
     {
141 141
         if ($this->yaconf && is_string($this->yaconf)) {
142
-            return $this->yaconf . '.' . $name;
142
+            return $this->yaconf.'.'.$name;
143 143
         }
144 144
 
145 145
         return $name;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     public function has($name)
189 189
     {
190 190
         if (false === strpos($name, '.')) {
191
-            $name = $this->prefix . '.' . $name;
191
+            $name = $this->prefix.'.'.$name;
192 192
         }
193 193
 
194 194
         return !is_null($this->get($name));
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     public function get($name = null, $default = null)
227 227
     {
228 228
         if ($name && false === strpos($name, '.')) {
229
-            $name = $this->prefix . '.' . $name;
229
+            $name = $this->prefix.'.'.$name;
230 230
         }
231 231
 
232 232
         // 无参数时获取所有
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     {
274 274
         if (is_string($name)) {
275 275
             if (false === strpos($name, '.')) {
276
-                $name = $this->prefix . '.' . $name;
276
+                $name = $this->prefix.'.'.$name;
277 277
             }
278 278
 
279 279
             $name = explode('.', $name, 3);
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
     public function remove($name)
316 316
     {
317 317
         if (false === strpos($name, '.')) {
318
-            $name = $this->prefix . '.' . $name;
318
+            $name = $this->prefix.'.'.$name;
319 319
         }
320 320
 
321 321
         $name = explode('.', $name, 3);
Please login to merge, or discard this patch.
library/think/paginator/driver/Bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     protected function getAvailablePageWrapper($url, $page)
138 138
     {
139
-        return '<li><a href="' . htmlentities($url) . '">' . $page . '</a></li>';
139
+        return '<li><a href="'.htmlentities($url).'">'.$page.'</a></li>';
140 140
     }
141 141
 
142 142
     /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     protected function getDisabledTextWrapper($text)
149 149
     {
150
-        return '<li class="disabled"><span>' . $text . '</span></li>';
150
+        return '<li class="disabled"><span>'.$text.'</span></li>';
151 151
     }
152 152
 
153 153
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     protected function getActivePageWrapper($text)
160 160
     {
161
-        return '<li class="active"><span>' . $text . '</span></li>';
161
+        return '<li class="active"><span>'.$text.'</span></li>';
162 162
     }
163 163
 
164 164
     /**
Please login to merge, or discard this patch.
library/think/session/driver/Redis.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function read($sessID)
97 97
     {
98
-        return (string) $this->handler->get($this->config['session_name'] . $sessID);
98
+        return (string) $this->handler->get($this->config['session_name'].$sessID);
99 99
     }
100 100
 
101 101
     /**
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
     public function write($sessID, $sessData)
109 109
     {
110 110
         if ($this->config['expire'] > 0) {
111
-            $result = $this->handler->setex($this->config['session_name'] . $sessID, $this->config['expire'], $sessData);
111
+            $result = $this->handler->setex($this->config['session_name'].$sessID, $this->config['expire'], $sessData);
112 112
         } else {
113
-            $result = $this->handler->set($this->config['session_name'] . $sessID, $sessData);
113
+            $result = $this->handler->set($this->config['session_name'].$sessID, $sessData);
114 114
         }
115 115
 
116 116
         return $result ? true : false;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function destroy($sessID)
126 126
     {
127
-        return $this->handler->delete($this->config['session_name'] . $sessID) > 0;
127
+        return $this->handler->delete($this->config['session_name'].$sessID) > 0;
128 128
     }
129 129
 
130 130
     /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $this->open('', '');
152 152
         }
153 153
 
154
-        $lockKey = 'LOCK_PREFIX_' . $sessID;
154
+        $lockKey = 'LOCK_PREFIX_'.$sessID;
155 155
         // 使用setnx操作加锁
156 156
         $isLock = $this->handler->setnx($lockKey, 1);
157 157
         if ($isLock) {
@@ -174,6 +174,6 @@  discard block
 block discarded – undo
174 174
             $this->open('', '');
175 175
         }
176 176
 
177
-        $this->handler->del('LOCK_PREFIX_' . $sessID);
177
+        $this->handler->del('LOCK_PREFIX_'.$sessID);
178 178
     }
179 179
 }
Please login to merge, or discard this patch.
library/think/session/driver/Memcached.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function read($sessID)
98 98
     {
99
-        return (string) $this->handler->get($this->config['session_name'] . $sessID);
99
+        return (string) $this->handler->get($this->config['session_name'].$sessID);
100 100
     }
101 101
 
102 102
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function write($sessID, $sessData)
110 110
     {
111
-        return $this->handler->set($this->config['session_name'] . $sessID, $sessData, $this->config['expire']);
111
+        return $this->handler->set($this->config['session_name'].$sessID, $sessData, $this->config['expire']);
112 112
     }
113 113
 
114 114
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function destroy($sessID)
121 121
     {
122
-        return $this->handler->delete($this->config['session_name'] . $sessID);
122
+        return $this->handler->delete($this->config['session_name'].$sessID);
123 123
     }
124 124
 
125 125
     /**
Please login to merge, or discard this patch.