Various code cleanup.

This commit is contained in:
James Cole
2018-08-04 17:30:06 +02:00
parent 5af026674f
commit f0d3ca5d53
88 changed files with 552 additions and 311 deletions

View File

@@ -25,6 +25,7 @@ namespace FireflyIII\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Class PiggyBankRepetition.
@@ -44,20 +45,17 @@ class PiggyBankRepetition extends Model
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'startdate' => 'date',
'targetdate' => 'date',
];
/** @var array */
protected $dates = ['startdate', 'targetdate'];
/** @var array */
/** @var array Fields that can be filled */
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
/**
* @codeCoverageIgnore
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
* @return BelongsTo
*/
public function piggyBank(): \Illuminate\Database\Eloquent\Relations\BelongsTo
public function piggyBank(): BelongsTo
{
return $this->belongsTo(PiggyBank::class);
}