mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 09:14:08 +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:
@@ -31,14 +31,14 @@ class CustomField extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function setTimeAnswerAttribute($value)
|
||||
public function setTimeAnswerAttribute(mixed $value): void
|
||||
{
|
||||
if ($value && $value != null) {
|
||||
$this->attributes['time_answer'] = date('H:i:s', strtotime($value));
|
||||
}
|
||||
}
|
||||
|
||||
public function setOptionsAttribute($value)
|
||||
public function setOptionsAttribute(mixed $value): void
|
||||
{
|
||||
$this->attributes['options'] = json_encode($value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user