Kaynağa Gözat

Update helpers.php

咯拉咯啦 3 yıl önce
ebeveyn
işleme
589d4da3c5
1 değiştirilmiş dosya ile 6 ekleme ve 5 silme
  1. 6 5
      src/Support/helpers.php

+ 6 - 5
src/Support/helpers.php

@@ -572,18 +572,19 @@ if (! function_exists('admin_redirect')) {
     }
 }
 
-if (!function_exists('format_byte')) {
+if (! function_exists('format_byte')) {
     /**
-     * 文件单位换算
+     * 文件单位换算.
+     *
      * @param $input
      * @param  int  $dec
      * @return string
      */
     function format_byte($input, $dec = 0)
     {
-        $prefix_arr = array("B", "KB", "MB", "GB", "TB");
-        $value      = round($input, $dec);
-        $i          = 0;
+        $prefix_arr = ['B', 'KB', 'MB', 'GB', 'TB'];
+        $value = round($input, $dec);
+        $i = 0;
         while ($value > 1024) {
             $value /= 1024;
             $i++;