1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

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
* @throws RuntimeException
*/
public function without_deleted_clients(): Builder
{
@ -302,7 +301,6 @@ abstract class QueryFilters
/**
* @return Builder
* @throws RuntimeException
*/
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);
}
@ -285,109 +285,95 @@ class Activity extends StaticModel
return self::class;
}
public function backup()
public function backup(): \Illuminate\Database\Eloquent\Relations\HasOne
{
return $this->hasOne(Backup::class);
}
public function history()
public function history(): \Illuminate\Database\Eloquent\Relations\HasOne
{
return $this->hasOne(Backup::class);
}
public function user() :BelongsTo
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class)->withTrashed();
}
public function contact()
public function contact(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(ClientContact::class, 'client_contact_id', 'id')->withTrashed();
}
public function client()
public function client(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Client::class)->withTrashed();
}
public function invoice()
public function invoice(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Invoice::class)->withTrashed();
}
public function vendor()
public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
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();
}
public function credit()
public function credit(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Credit::class)->withTrashed();
}
public function quote()
public function quote(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Quote::class)->withTrashed();
}
public function subscription()
public function subscription(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Subscription::class)->withTrashed();
}
public function payment()
public function payment(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Payment::class)->withTrashed();
}
public function expense()
public function expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
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();
}
public function purchase_order()
public function purchase_order(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(PurchaseOrder::class)->withTrashed();
}
public function vendor_contact()
public function vendor_contact(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(VendorContact::class)->withTrashed();
}
public function task()
public function task(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Task::class)->withTrashed();
}
public function company()
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Company::class);
}