@@ -4,14 +4,14 @@ |
||
| 4 | 4 | |
| 5 | 5 | class Utils |
| 6 | 6 | { |
| 7 | - public static function bytesToHuman($bytes) |
|
| 8 | - { |
|
| 9 | - $units = [__('B'), __('KiB'), __('MiB'), __('GiB'), __('TiB'), __('PiB')]; |
|
| 7 | + public static function bytesToHuman($bytes) |
|
| 8 | + { |
|
| 9 | + $units = [__('B'), __('KiB'), __('MiB'), __('GiB'), __('TiB'), __('PiB')]; |
|
| 10 | 10 | |
| 11 | - for ($i = 0; $bytes > 1024; $i++) { |
|
| 12 | - $bytes /= 1024; |
|
| 13 | - } |
|
| 11 | + for ($i = 0; $bytes > 1024; $i++) { |
|
| 12 | + $bytes /= 1024; |
|
| 13 | + } |
|
| 14 | 14 | |
| 15 | - return round($bytes, 2) . ' ' . $units[$i]; |
|
| 16 | - } |
|
| 15 | + return round($bytes, 2) . ' ' . $units[$i]; |
|
| 16 | + } |
|
| 17 | 17 | } |
| 18 | 18 | \ No newline at end of file |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public $table = 'users'; |
| 10 | 10 | |
| 11 | - function init(){ |
|
| 11 | + function init() { |
|
| 12 | 12 | parent::init(); |
| 13 | 13 | |
| 14 | 14 | $this->addFields(['name']); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | protected function showEditPermissions() |
| 37 | 37 | { |
| 38 | - $permissionsData = Permission::all(['id', 'name'])->map(function($permission){ |
|
| 38 | + $permissionsData = Permission::all(['id', 'name'])->map(function($permission) { |
|
| 39 | 39 | $permission['name'] = trans(ucwords($permission['name'])); |
| 40 | 40 | |
| 41 | 41 | return $permission; |
@@ -99,19 +99,19 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | protected function columns() |
| 101 | 101 | { |
| 102 | - return $this->columns = $this->columns?: $this->add('Columns'); |
|
| 102 | + return $this->columns = $this->columns ?: $this->add('Columns'); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | protected function permissionId() |
| 106 | 106 | { |
| 107 | - return $this->app->stickyGet($this->columns()->name)?: $this->getModuleVariable('permission'); |
|
| 107 | + return $this->app->stickyGet($this->columns()->name) ?: $this->getModuleVariable('permission'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | protected function reload($permissionExpression = null) |
| 111 | 111 | { |
| 112 | 112 | $columns = $this->columns(); |
| 113 | 113 | |
| 114 | - return $this->reload = $this->reload?: new jsReload($columns, [$columns->name => $permissionExpression?: '']); |
|
| 114 | + return $this->reload = $this->reload ?: new jsReload($columns, [$columns->name => $permissionExpression ?: '']); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | protected function getModel($array) |