rabin 2 months ago
parent
commit
319beeda25
1 changed files with 6 additions and 6 deletions
  1. 6 6
      boot.php

+ 6 - 6
boot.php

@@ -7,11 +7,11 @@ if (defined('DEVER_SERVER')) {
 }
 class Dever
 {
-    public static $data = array();
+    public static $data = [];
     public static $commit = true;
     public static function server()
     {
-        spl_autoload_register(array('Dever', 'autoload'));
+        spl_autoload_register(['Dever', 'autoload']);
         $http_worker = new \Workerman\Worker("http://0.0.0.0:8085");
 
         // 启动4个进程对外提供服务
@@ -30,7 +30,7 @@ class Dever
     }
     public static function run()
     {
-        spl_autoload_register(array('Dever', 'autoload'));
+        spl_autoload_register(['Dever', 'autoload']);
         $route = Dever\Route::get();
         Dever\Debug::init();
         Dever\Project::register();
@@ -68,9 +68,9 @@ class Dever
             Dever\Library::autoload($class);
         }
     }
-    public static function call($class, $param = array(), $path = '')
+    public static function call($class, $param = [], $path = '')
     {
-        if (!is_array($param)) $param = array($param);
+        if (!is_array($param)) $param = [$param];
         if (strpos($class, '?')) {
             list($class, $temp) = explode('?', $class);
             parse_str($temp, $temp);
@@ -118,7 +118,7 @@ class Dever
             if (is_bool($type)) {
                 $type = '不选择';
             }
-            $default = array(0 => array('id' => -1, 'name' => $type));
+            $default = [0 => ['id' => -1, 'name' => $type]];
             $data = array_merge($default, $data);
         }
         return $data;