mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
A set of small fixes, courtesy of scrutinizer-ci
This commit is contained in:
@@ -16,29 +16,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @property Carbon $enddate
|
||||
* @property float $amount
|
||||
* @property-read BudgetLimit $budgetLimit
|
||||
* @property int $budget_id
|
||||
*/
|
||||
class LimitRepetition extends Model
|
||||
{
|
||||
|
||||
protected $hidden = ['amount_encrypted'];
|
||||
protected $dates = ['created_at', 'updated_at', 'startdate', 'enddate'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function budgetLimit()
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\BudgetLimit');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
{
|
||||
$this->attributes['amount'] = strval(round($value, 2));
|
||||
}
|
||||
|
||||
protected $hidden = ['amount_encrypted'];
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
@@ -60,4 +44,20 @@ class LimitRepetition extends Model
|
||||
throw new NotFoundHttpException;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function budgetLimit()
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\BudgetLimit');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
{
|
||||
$this->attributes['amount'] = strval(round($value, 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user