A set of small fixes, courtesy of scrutinizer-ci

This commit is contained in:
James Cole
2016-01-27 18:31:44 +01:00
parent e8776d44c5
commit 9155c13e08
16 changed files with 261 additions and 256 deletions

View File

@@ -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));
}
}