Fix backend code styling

This commit is contained in:
MakingCG
2021-05-24 14:48:13 +00:00
committed by GitHub Actions
parent 99b4b030d2
commit 350f130d98
98 changed files with 1845 additions and 1845 deletions

View File

@@ -12,9 +12,9 @@ use Kyslik\ColumnSortable\Sortable;
use App\Notifications\ResetPassword;
use Illuminate\Support\Facades\Storage;
use Illuminate\Notifications\Notifiable;
use Makingcg\Invoice\App\Traits\Invoiceable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Makingcg\Invoice\App\Traits\Invoiceable;
class User extends Authenticatable
{
@@ -35,7 +35,7 @@ class User extends Authenticatable
];
protected $casts = [
'id' => 'string',
'id' => 'string',
'email_verified_at' => 'datetime',
];
@@ -88,15 +88,15 @@ class User extends Authenticatable
// 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),
];
}
@@ -138,13 +138,13 @@ class User extends Authenticatable
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;