mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Various code cleanup.
This commit is contained in:
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
@@ -52,16 +53,16 @@ class TransactionCurrency extends Model
|
||||
'deleted_at' => 'datetime',
|
||||
'decimal_places' => 'int',
|
||||
];
|
||||
/** @var array */
|
||||
protected $dates = ['date'];
|
||||
/** @var array */
|
||||
/** @var array Fields that can be filled */
|
||||
protected $fillable = ['name', 'code', 'symbol', 'decimal_places'];
|
||||
|
||||
/**
|
||||
* Route binder. Converts the key in the URL to the specified object (or throw 404).
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): TransactionCurrency
|
||||
{
|
||||
@@ -77,9 +78,9 @@ class TransactionCurrency extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
* @return HasMany
|
||||
*/
|
||||
public function transactionJournals(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
public function transactionJournals(): HasMany
|
||||
{
|
||||
return $this->hasMany(TransactionJournal::class);
|
||||
}
|
||||
|
Reference in New Issue
Block a user