mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Various code cleanup.
This commit is contained in:
@@ -189,6 +189,7 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $fieldName
|
||||
*
|
||||
* @return string
|
||||
@@ -206,6 +207,7 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -299,6 +301,7 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param array $types
|
||||
*/
|
||||
@@ -313,6 +316,7 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
@@ -331,7 +335,9 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setIbanAttribute($value)
|
||||
@@ -341,6 +347,7 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
@@ -352,7 +359,9 @@ class Account extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setVirtualBalanceAttribute($value)
|
||||
|
@@ -69,6 +69,7 @@ class AccountMeta extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setDataAttribute($value)
|
||||
|
@@ -70,6 +70,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* Get all of the owning attachable models.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return MorphTo
|
||||
@@ -81,7 +82,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* Returns the expected filename for this attachment.
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return string
|
||||
*/
|
||||
public function fileName(): string
|
||||
@@ -91,7 +93,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
*/
|
||||
public function getDescriptionAttribute($value)
|
||||
@@ -105,7 +108,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
*/
|
||||
public function getFilenameAttribute($value)
|
||||
@@ -119,7 +123,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
*/
|
||||
public function getMimeAttribute($value)
|
||||
@@ -133,7 +138,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
*/
|
||||
public function getNotesAttribute($value)
|
||||
@@ -147,7 +153,8 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*@codeCoverageIgnore
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
*/
|
||||
public function getTitleAttribute($value)
|
||||
@@ -161,6 +168,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setDescriptionAttribute(string $value)
|
||||
@@ -170,6 +178,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setFilenameAttribute(string $value)
|
||||
@@ -179,6 +188,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setMimeAttribute(string $value)
|
||||
@@ -188,6 +198,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setNotesAttribute(string $value)
|
||||
@@ -197,6 +208,7 @@ class Attachment extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function setTitleAttribute(string $value)
|
||||
|
@@ -96,6 +96,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -111,6 +112,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -135,6 +137,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountMaxAttribute($value)
|
||||
@@ -144,6 +147,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setAmountMinAttribute($value)
|
||||
@@ -153,6 +157,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setMatchAttribute($value)
|
||||
@@ -164,6 +169,7 @@ class Bill extends Model
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
|
@@ -84,7 +84,7 @@ class Budget extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Budget $value
|
||||
* @param string $value
|
||||
*
|
||||
* @return Budget
|
||||
*/
|
||||
@@ -111,6 +111,7 @@ class Budget extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -126,6 +127,7 @@ class Budget extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
|
@@ -77,6 +77,7 @@ class BudgetLimit extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
|
@@ -83,7 +83,7 @@ class Category extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Category $value
|
||||
* @param string $value
|
||||
*
|
||||
* @return Category
|
||||
*/
|
||||
@@ -101,6 +101,7 @@ class Category extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -116,6 +117,7 @@ class Category extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
|
@@ -49,6 +49,7 @@ class Configuration extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return mixed
|
||||
@@ -60,6 +61,7 @@ class Configuration extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setDataAttribute($value)
|
||||
|
@@ -61,6 +61,7 @@ class ExportJob extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $status
|
||||
*/
|
||||
public function change($status)
|
||||
|
@@ -69,9 +69,9 @@ class PiggyBank extends Model
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$piggyBankId = intval($value);
|
||||
$piggyBank = PiggyBank::where('piggy_banks.id', $piggyBankId)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')
|
||||
->where('accounts.user_id', auth()->user()->id)->first(['piggy_banks.*']);
|
||||
$piggyBank = self::where('piggy_banks.id', $piggyBankId)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')
|
||||
->where('accounts.user_id', auth()->user()->id)->first(['piggy_banks.*']);
|
||||
if (!is_null($piggyBank)) {
|
||||
return $piggyBank;
|
||||
}
|
||||
@@ -111,6 +111,7 @@ class PiggyBank extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -196,6 +197,7 @@ class PiggyBank extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
@@ -207,6 +209,7 @@ class PiggyBank extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setTargetamountAttribute($value)
|
||||
|
@@ -62,6 +62,7 @@ class PiggyBankEvent extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
|
@@ -60,6 +60,7 @@ class PiggyBankRepetition extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param Carbon $start
|
||||
* @param Carbon $target
|
||||
@@ -73,6 +74,7 @@ class PiggyBankRepetition extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param Carbon $date
|
||||
*
|
||||
@@ -96,6 +98,7 @@ class PiggyBankRepetition extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setCurrentamountAttribute($value)
|
||||
|
@@ -80,6 +80,7 @@ class Preference extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setDataAttribute($value)
|
||||
|
@@ -123,6 +123,7 @@ class Tag extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -138,6 +139,7 @@ class Tag extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -171,6 +173,7 @@ class Tag extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setDescriptionAttribute($value)
|
||||
@@ -180,6 +183,7 @@ class Tag extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setTagAttribute($value)
|
||||
|
@@ -108,6 +108,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param string $table
|
||||
*
|
||||
@@ -168,6 +169,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return float|int
|
||||
@@ -179,6 +181,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param Carbon $date
|
||||
*/
|
||||
@@ -192,6 +195,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param Carbon $date
|
||||
*/
|
||||
@@ -205,6 +209,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Builder $query
|
||||
* @param array $types
|
||||
*/
|
||||
@@ -222,6 +227,7 @@ class Transaction extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setAmountAttribute($value)
|
||||
|
@@ -59,7 +59,7 @@ class TransactionCurrency extends Model
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$currencyId = intval($value);
|
||||
$currency = TransactionCurrency::find($currencyId);
|
||||
$currency = self::find($currencyId);
|
||||
if (!is_null($currency)) {
|
||||
return $currency;
|
||||
}
|
||||
|
@@ -141,6 +141,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
@@ -163,6 +164,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
@@ -214,6 +216,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
@@ -311,6 +314,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param Carbon $date
|
||||
*
|
||||
@@ -323,6 +327,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param Carbon $date
|
||||
*
|
||||
@@ -335,6 +340,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
*/
|
||||
public function scopeSortCorrectly(EloquentBuilder $query)
|
||||
@@ -346,6 +352,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param array $types
|
||||
*/
|
||||
@@ -361,6 +368,7 @@ class TransactionJournal extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setDescriptionAttribute($value)
|
||||
|
@@ -72,6 +72,7 @@ class TransactionJournalLink extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return null|string
|
||||
@@ -96,6 +97,7 @@ class TransactionJournalLink extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setCommentAttribute($value): void
|
||||
|
@@ -50,6 +50,7 @@ class TransactionJournalMeta extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return mixed
|
||||
@@ -61,6 +62,7 @@ class TransactionJournalMeta extends Model
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*/
|
||||
public function setDataAttribute($value)
|
||||
|
Reference in New Issue
Block a user