Updates for static analysis

This commit is contained in:
David Bomba 2023-08-03 13:41:04 +10:00
parent 6a92d91895
commit 57d63c8333
2 changed files with 19 additions and 35 deletions

View File

@ -289,7 +289,6 @@ abstract class QueryFilters
/** /**
* @return Builder * @return Builder
* @throws RuntimeException
*/ */
public function without_deleted_clients(): Builder public function without_deleted_clients(): Builder
{ {
@ -302,7 +301,6 @@ abstract class QueryFilters
/** /**
* @return Builder * @return Builder
* @throws RuntimeException
*/ */
public function without_deleted_vendors(): Builder public function without_deleted_vendors(): Builder
{ {

View File

@ -274,7 +274,7 @@ class Activity extends StaticModel
]; ];
public function getHashedIdAttribute() public function getHashedIdAttribute(): string
{ {
return $this->encodePrimaryKey($this->id); return $this->encodePrimaryKey($this->id);
} }
@ -285,109 +285,95 @@ class Activity extends StaticModel
return self::class; return self::class;
} }
public function backup(): \Illuminate\Database\Eloquent\Relations\HasOne
public function backup()
{ {
return $this->hasOne(Backup::class); return $this->hasOne(Backup::class);
} }
public function history(): \Illuminate\Database\Eloquent\Relations\HasOne
public function history()
{ {
return $this->hasOne(Backup::class); return $this->hasOne(Backup::class);
} }
public function user() :BelongsTo public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(User::class)->withTrashed(); return $this->belongsTo(User::class)->withTrashed();
} }
public function contact(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function contact()
{ {
return $this->belongsTo(ClientContact::class, 'client_contact_id', 'id')->withTrashed(); return $this->belongsTo(ClientContact::class, 'client_contact_id', 'id')->withTrashed();
} }
public function client(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function client()
{ {
return $this->belongsTo(Client::class)->withTrashed(); return $this->belongsTo(Client::class)->withTrashed();
} }
public function invoice(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function invoice()
{ {
return $this->belongsTo(Invoice::class)->withTrashed(); return $this->belongsTo(Invoice::class)->withTrashed();
} }
public function vendor() public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(Vendor::class)->withTrashed(); return $this->belongsTo(Vendor::class)->withTrashed();
} }
public function recurring_invoice() public function recurring_invoice(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(RecurringInvoice::class)->withTrashed(); return $this->belongsTo(RecurringInvoice::class)->withTrashed();
} }
public function credit(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function credit()
{ {
return $this->belongsTo(Credit::class)->withTrashed(); return $this->belongsTo(Credit::class)->withTrashed();
} }
public function quote(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function quote()
{ {
return $this->belongsTo(Quote::class)->withTrashed(); return $this->belongsTo(Quote::class)->withTrashed();
} }
public function subscription(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function subscription()
{ {
return $this->belongsTo(Subscription::class)->withTrashed(); return $this->belongsTo(Subscription::class)->withTrashed();
} }
public function payment(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function payment()
{ {
return $this->belongsTo(Payment::class)->withTrashed(); return $this->belongsTo(Payment::class)->withTrashed();
} }
public function expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function expense()
{ {
return $this->belongsTo(Expense::class)->withTrashed(); return $this->belongsTo(Expense::class)->withTrashed();
} }
public function recurring_expense() public function recurring_expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{ {
return $this->belongsTo(RecurringExpense::class)->withTrashed(); return $this->belongsTo(RecurringExpense::class)->withTrashed();
} }
public function purchase_order(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function purchase_order()
{ {
return $this->belongsTo(PurchaseOrder::class)->withTrashed(); return $this->belongsTo(PurchaseOrder::class)->withTrashed();
} }
public function vendor_contact(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function vendor_contact()
{ {
return $this->belongsTo(VendorContact::class)->withTrashed(); return $this->belongsTo(VendorContact::class)->withTrashed();
} }
public function task(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function task()
{ {
return $this->belongsTo(Task::class)->withTrashed(); return $this->belongsTo(Task::class)->withTrashed();
} }
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function company()
{ {
return $this->belongsTo(Company::class); return $this->belongsTo(Company::class);
} }