Fix backend code styling

This commit is contained in:
MakingCG
2021-07-17 18:38:41 +00:00
committed by GitHub Actions
parent 9ba3d9a6ba
commit ec6d11b7ae
91 changed files with 1732 additions and 1737 deletions
+6 -6
View File
@@ -136,10 +136,10 @@ class File extends Model
: get_pretty_name($this->attributes['basename'], $this->attributes['name'], $this->attributes['mimetype']);
$header = [
'ResponseAcceptRanges' => 'bytes',
'ResponseContentType' => $this->attributes['mimetype'],
'ResponseContentLength' => $this->attributes['filesize'],
'ResponseContentRange' => 'bytes 0-600/' . $this->attributes['filesize'],
'ResponseAcceptRanges' => 'bytes',
'ResponseContentType' => $this->attributes['mimetype'],
'ResponseContentLength' => $this->attributes['filesize'],
'ResponseContentRange' => 'bytes 0-600/' . $this->attributes['filesize'],
'ResponseContentDisposition' => 'attachment; filename=' . $file_pretty_name,
];
@@ -167,8 +167,8 @@ class File extends Model
$name = Str::slug($array['name'], ' ');
return [
'id' => $this->id,
'name' => $name,
'id' => $this->id,
'name' => $name,
'nameNgrams' => utf8_encode((new TNTIndexer)->buildTrigrams(implode(', ', [$name]))),
];
}
+2 -2
View File
@@ -64,8 +64,8 @@ class Folder extends Model
$name = Str::slug($array['name'], ' ');
return [
'id' => $this->id,
'name' => $name,
'id' => $this->id,
'name' => $name,
'nameNgrams' => utf8_encode((new TNTIndexer)->buildTrigrams(implode(', ', [$name]))),
];
}
+1 -1
View File
@@ -12,7 +12,7 @@ class Invoice extends Model
protected $casts = [
'seller' => 'array',
'client' => 'array',
'bag' => 'array',
'bag' => 'array',
];
/**
+12 -12
View File
@@ -12,9 +12,9 @@ use App\Notifications\ResetPassword;
use Illuminate\Support\Facades\Storage;
use Illuminate\Notifications\Notifiable;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
class User extends Authenticatable implements MustVerifyEmail
{
@@ -34,7 +34,7 @@ class User extends Authenticatable implements MustVerifyEmail
];
protected $casts = [
'id' => 'string',
'id' => 'string',
'email_verified_at' => 'datetime',
];
@@ -87,15 +87,15 @@ class User extends Authenticatable implements MustVerifyEmail
// Get user storage usage
if (! $is_storage_limit) {
return [
'used' => $this->used_capacity,
'used' => $this->used_capacity,
'used_formatted' => Metric::bytes($this->used_capacity)->format(),
];
}
return [
'used' => (float) get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity),
'used_formatted' => get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity) . '%',
'capacity' => $this->settings->storage_capacity,
'used' => (float) get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity),
'used_formatted' => get_storage_fill_percentage($this->used_capacity, $this->settings->storage_capacity) . '%',
'capacity' => $this->settings->storage_capacity,
'capacity_formatted' => format_gigabytes($this->settings->storage_capacity),
];
}
@@ -137,13 +137,13 @@ class User extends Authenticatable implements MustVerifyEmail
public function setBilling($billing)
{
$this->settings()->update([
'address' => $billing['billing_address'],
'city' => $billing['billing_city'],
'country' => $billing['billing_country'],
'name' => $billing['billing_name'],
'address' => $billing['billing_address'],
'city' => $billing['billing_city'],
'country' => $billing['billing_country'],
'name' => $billing['billing_name'],
'phone_number' => $billing['billing_phone_number'],
'postal_code' => $billing['billing_postal_code'],
'state' => $billing['billing_state'],
'postal_code' => $billing['billing_postal_code'],
'state' => $billing['billing_state'],
]);
return $this->settings;