Some code cleanup courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 17:38:09 +01:00
parent a755badd5f
commit 820722f44e
24 changed files with 226 additions and 164 deletions

View File

@@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\JoinClause;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Watson\Validating\ValidatingTrait;
use Illuminate\Database\Query\Builder;
/**
* FireflyIII\Models\Account
@@ -30,8 +30,8 @@ use Watson\Validating\ValidatingTrait;
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\PiggyBank[] $piggyBanks
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions
* @property-read \FireflyIII\User $user
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Account accountTypeIn($types)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Account hasMetaValue($name, $value)
* @method static Builder|\FireflyIII\Models\Account accountTypeIn($types)
* @method static Builder|\FireflyIII\Models\Account hasMetaValue($name, $value)
* @property string $startBalance
* @property string $endBalance
*/
@@ -293,6 +293,11 @@ class Account extends Model
return $this->belongsTo('FireflyIII\User');
}
/**
* @param Account $value
*
* @return Account
*/
public static function routeBinder(Account $value)
{

View File

@@ -175,6 +175,11 @@ class Attachment extends Model
$this->attributes['notes'] = Crypt::encrypt($value);
}
/**
* @param Attachment $value
*
* @return Attachment
*/
public static function routeBinder(Attachment $value)
{
if (Auth::check()) {

View File

@@ -28,6 +28,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property boolean $match_encrypted
* @property-read Collection|TransactionJournal[] $transactionjournals
* @property-read User $user
* @property Carbon $nextExpectedMatch
* @property Carbon $lastFoundMatch
*/
class Bill extends Model
{
@@ -127,6 +129,11 @@ class Bill extends Model
}
/**
* @param Bill $value
*
* @return Bill
*/
public static function routeBinder(Bill $value)
{
if (Auth::check()) {

View File

@@ -23,6 +23,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property-read Collection|BudgetLimit[] $budgetlimits
* @property-read Collection|TransactionJournal[] $transactionjournals
* @property-read User $user
* @property string $dateFormatted
* @property string $budgeted
*/
class Budget extends Model
{
@@ -125,6 +127,11 @@ class Budget extends Model
return $this->belongsTo('FireflyIII\User');
}
/**
* @param Budget $value
*
* @return Budget
*/
public static function routeBinder(Budget $value)
{
if (Auth::check()) {

View File

@@ -112,6 +112,11 @@ class Category extends Model
return $this->belongsTo('FireflyIII\User');
}
/**
* @param Category $value
*
* @return Category
*/
public static function routeBinder(Category $value)
{
if (Auth::check()) {

View File

@@ -47,6 +47,11 @@ class LimitRepetition extends Model
}
/**
* @param $value
*
* @return mixed
*/
public static function routeBinder($value)
{
if (Auth::check()) {

View File

@@ -122,6 +122,11 @@ class PiggyBank extends Model
$this->attributes['targetamount'] = strval(round($value, 2));
}
/**
* @param PiggyBank $value
*
* @return PiggyBank
*/
public static function routeBinder(PiggyBank $value)
{
if (Auth::check()) {

View File

@@ -170,6 +170,11 @@ class Tag extends Model
}
/**
* @param Tag $value
*
* @return Tag
*/
public static function routeBinder(Tag $value)
{
if (Auth::check()) {

View File

@@ -44,6 +44,8 @@ class TransactionCurrency extends Model
/**
* @param TransactionCurrency $currency
*
* @return TransactionCurrency
*/
public static function routeBinder(TransactionCurrency $currency)
{