Code rearrange and optimise.

This commit is contained in:
James Cole
2015-03-29 21:27:51 +02:00
parent 210f84b6ea
commit bea321939e
34 changed files with 155 additions and 155 deletions

View File

@@ -1,10 +1,11 @@
<?php namespace FireflyIII\Models;
use Crypt;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
use Crypt;
/**
* Class Account
*

View File

@@ -14,12 +14,12 @@ class AccountMeta extends Model
use ValidatingTrait;
protected $fillable = ['account_id', 'name', 'data'];
protected $rules
= [
= [
'account_id' => 'required|exists:accounts,id',
'name' => 'required|between:1,100',
'data' => 'required'
];
protected $table = 'account_meta';
protected $table = 'account_meta';
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo

View File

@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Model;
class Bill extends Model
{
protected $fillable = ['name', 'match', 'amount_min','user_id', 'amount_max', 'date', 'repeat_freq', 'skip', 'automatch', 'active',];
protected $fillable = ['name', 'match', 'amount_min', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip', 'automatch', 'active',];
/**
* @return array

View File

@@ -12,7 +12,7 @@ class Component extends Model
{
use SoftDeletes;
protected $fillable = ['user_id', 'name','class'];
protected $fillable = ['user_id', 'name', 'class'];
/**
* @return array

View File

@@ -1,11 +1,10 @@
<?php namespace FireflyIII\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App;
use Log;
/**
* Class PiggyBank
*
@@ -44,7 +43,7 @@ class PiggyBank extends Model
return $rep;
} else {
Log::error('Tried to work with a piggy bank with a repeats=1 value! (id is '.$this->id.')');
Log::error('Tried to work with a piggy bank with a repeats=1 value! (id is ' . $this->id . ')');
}