Passed
Pull Request — 5.1 (#1327)
by
unknown
08:41 queued 03:50
created
constant.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 sgdefine('SITE_DEBUG', false);
27 27
 
28 28
 // 设置全局变量sg
29
-$sg['_debug']  = false;  // 调试模式
30
-$sg['_define'] = [];    // 全局常量
31
-$sg['_config'] = [];    // 全局配置
32
-$sg['_env']    = [];    // 环境配置
33
-$sg['_access'] = [];    // 访问配置
34
-$sg['_router'] = [];    // 路由配置
29
+$sg['_debug']  = false; // 调试模式
30
+$sg['_define'] = []; // 全局常量
31
+$sg['_config'] = []; // 全局配置
32
+$sg['_env']    = []; // 环境配置
33
+$sg['_access'] = []; // 访问配置
34
+$sg['_router'] = []; // 路由配置
35 35
 
36 36
 // 初始化环境变量
37 37
 sgenv();
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 sgdefine('SITE_URL', (IS_HTTPS ? 'https:' : 'http:') . '//' . SITE_DOMAIN . __ROOT__);
66 66
 
67 67
 // 新系统需要的一些配置
68
-sgdefine('SG_ROOT', SITE_PATH);   // SG根
68
+sgdefine('SG_ROOT', SITE_PATH); // SG根
69 69
 sgdefine('SG_APPLICATION', SG_ROOT . 'application'); // 应用存在的目录
70 70
 sgdefine('SG_CONFIGURE', SG_ROOT . 'config'); // 配置文件存在的目录
71
-sgdefine('SG_STORAGE', DS . 'storage');            // 储存目录,需要可以公开访问,相对于域名根
71
+sgdefine('SG_STORAGE', DS . 'storage'); // 储存目录,需要可以公开访问,相对于域名根
72 72
 
73 73
 sgdefine('ROOT_PATH', SITE_PATH);
74 74
 sgdefine('ROOT_FILE', basename(_PHP_FILE_));
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 sgdefine('ENV_PREFIX', 'PHP_'); // 环境变量的配置前缀
96 96
 
97 97
 sgdefine('APPS_PATH', ROOT_PATH . 'application' . DS);
98
-sgdefine('APPS_URL', SITE_URL . DS . 'application');    # 应用内部图标 等元素
98
+sgdefine('APPS_URL', SITE_URL . DS . 'application'); # 应用内部图标 等元素
99 99
 
100 100
 sgdefine('ADDON_PATH', ROOT_PATH . 'addons' . DS);
101 101
 sgdefine('ADDON_URL', SITE_URL . DS . 'addons');
@@ -313,10 +313,10 @@  discard block
 block discarded – undo
313 313
     }
314 314
     // 批量设置
315 315
     if (is_array($name)) {
316
-        return $sg['_config'] = array_merge((array)$sg['_config'], array_change_key_case($name));
316
+        return $sg['_config'] = array_merge((array) $sg['_config'], array_change_key_case($name));
317 317
     }
318 318
 
319
-    return null;// 避免非法参数
319
+    return null; // 避免非法参数
320 320
 }
321 321
 
322 322
 /**
Please login to merge, or discard this patch.
helper.php 2 patches
Indentation   -3 removed lines patch added patch discarded remove patch
@@ -463,7 +463,6 @@  discard block
 block discarded – undo
463 463
      * @param string    $name Model名称
464 464
      * @param  string $common       公共模块名,默认core
465 465
      * @param string    $layer 模型层名称
466
-
467 466
      * @return \think\Model
468 467
      */
469 468
     function model($name = '', $common = 'core', $layer = 'model', $appendSuffix = false)
@@ -478,7 +477,6 @@  discard block
 block discarded – undo
478 477
      * @param string    $name Logic名称
479 478
      * @param  string $common       公共模块名,默认core
480 479
      * @param string    $layer 业务层名称
481
-
482 480
      * @return mixed
483 481
      */
484 482
     function logic($name = '', $common = 'core', $layer = 'logic', $appendSuffix = true)
@@ -493,7 +491,6 @@  discard block
 block discarded – undo
493 491
      * @param string    $name Service名称
494 492
      * @param  string $common       公共模块名,默认core
495 493
      * @param string    $layer 服务层名称
496
-
497 494
      * @return mixed
498 495
      */
499 496
     function service($name = '', $common = 'core', $layer = 'service', $appendSuffix = true)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
     function parse_name($name, $type = 0, $ucfirst = true)
516 516
     {
517 517
         if ($type) {
518
-            $name = preg_replace_callback('/_([a-zA-Z])/', function ($match) {
518
+            $name = preg_replace_callback('/_([a-zA-Z])/', function($match) {
519 519
                 return strtoupper($match[1]);
520 520
             }, $name);
521 521
 
@@ -767,10 +767,10 @@  discard block
 block discarded – undo
767 767
 }
768 768
 
769 769
 if (!function_exists('trace_service')) {
770
-    function trace_service($trace,  $type = 'info', $debug = false)
770
+    function trace_service($trace, $type = 'info', $debug = false)
771 771
     {
772 772
         // 追踪代码信息,给函数埋雷,检测业务代码信息
773
-        if(!$debug){
773
+        if (!$debug) {
774 774
             $trace = [
775 775
                 'trace' => [
776 776
                     'class' => $trace[0]['class'],
Please login to merge, or discard this patch.