mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 17:24:10 +00:00
Add return types, typed parameters, and PHPDoc to all model methods
Modernize all 16 models with missing type declarations: - Return types on ~87 methods (string, bool, void, array, mixed, etc.) - Typed parameters where missing - PHPDoc blocks on non-obvious methods explaining their purpose Models updated: Invoice, Estimate, Payment, User, Company, Customer, RecurringInvoice, Setting, CompanySetting, FileDisk, Transaction, EmailLog, ExchangeRateLog, PaymentMethod, CustomField, CustomFieldValue.
This commit is contained in:
@@ -152,7 +152,11 @@ class Company extends Model implements HasMedia
|
||||
return $this->belongsToMany(User::class, 'user_company', 'company_id', 'user_id');
|
||||
}
|
||||
|
||||
public function hasTransactions()
|
||||
/**
|
||||
* Check whether the company has any business data such as customers,
|
||||
* items, invoices, estimates, expenses, payments, or recurring invoices.
|
||||
*/
|
||||
public function hasTransactions(): bool
|
||||
{
|
||||
if (
|
||||
$this->customers()->exists() ||
|
||||
|
||||
Reference in New Issue
Block a user