mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 09:14:08 +00:00
Add return types and typed parameters to remaining 10 models
Complete the type modernization across all models. Adds Builder-typed $query parameters and return types to all scope methods, typed parameters on accessors, and PHPDoc on scopePaginateData/scopeApplyFilters. Models updated: Address, EstimateItem, Expense, ExpenseCategory, InvoiceItem, Item, Note, Tax, TaxType, Unit. 5 models needed no changes (Country, Currency, ImpersonationLog, Module, UserSetting) as they had no untyped public methods.
This commit is contained in:
@@ -16,7 +16,7 @@ class Address extends Model
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function getCountryNameAttribute()
|
||||
public function getCountryNameAttribute(): ?string
|
||||
{
|
||||
$name = $this->country ? $this->country->name : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user