mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Code cleanup before release.
This commit is contained in:
@@ -116,6 +116,7 @@ class Account extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Account
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Account
|
||||
{
|
||||
@@ -210,6 +211,7 @@ class Account extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
@@ -274,9 +276,12 @@ class Account extends Model
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* @deprecated
|
||||
*
|
||||
* @param EloquentBuilder $query
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function scopeHasMetaValue(EloquentBuilder $query, $name, $value)
|
||||
{
|
||||
@@ -296,6 +301,7 @@ class Account extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setIbanAttribute($value)
|
||||
{
|
||||
@@ -306,6 +312,7 @@ class Account extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
{
|
||||
|
@@ -33,43 +33,43 @@ class AccountType extends Model
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const DEFAULT = 'Default account';
|
||||
public const DEFAULT = 'Default account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const CASH = 'Cash account';
|
||||
public const CASH = 'Cash account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const ASSET = 'Asset account';
|
||||
public const ASSET = 'Asset account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const EXPENSE = 'Expense account';
|
||||
public const EXPENSE = 'Expense account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const REVENUE = 'Revenue account';
|
||||
public const REVENUE = 'Revenue account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const INITIAL_BALANCE = 'Initial balance account';
|
||||
public const INITIAL_BALANCE = 'Initial balance account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const BENEFICIARY = 'Beneficiary account';
|
||||
public const BENEFICIARY = 'Beneficiary account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const IMPORT = 'Import account';
|
||||
public const IMPORT = 'Import account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const RECONCILIATION = 'Reconciliation account';
|
||||
public const RECONCILIATION = 'Reconciliation account';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const LOAN = 'Loan';
|
||||
public const LOAN = 'Loan';
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
|
@@ -55,6 +55,7 @@ class Attachment extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Attachment
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Attachment
|
||||
{
|
||||
@@ -96,6 +97,7 @@ class Attachment extends Model
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getDescriptionAttribute($value)
|
||||
{
|
||||
@@ -111,6 +113,7 @@ class Attachment extends Model
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getFilenameAttribute($value)
|
||||
{
|
||||
@@ -126,6 +129,7 @@ class Attachment extends Model
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getMimeAttribute($value)
|
||||
{
|
||||
@@ -141,6 +145,7 @@ class Attachment extends Model
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return null|string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getTitleAttribute($value)
|
||||
{
|
||||
@@ -164,6 +169,8 @@ class Attachment extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setDescriptionAttribute(string $value)
|
||||
{
|
||||
@@ -174,6 +181,7 @@ class Attachment extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setFilenameAttribute(string $value)
|
||||
{
|
||||
@@ -184,6 +192,7 @@ class Attachment extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setMimeAttribute(string $value)
|
||||
{
|
||||
@@ -194,6 +203,7 @@ class Attachment extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param string $value
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setTitleAttribute(string $value)
|
||||
{
|
||||
|
@@ -72,6 +72,7 @@ class Bill extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Bill
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Bill
|
||||
{
|
||||
@@ -100,6 +101,7 @@ class Bill extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getMatchAttribute($value)
|
||||
{
|
||||
@@ -116,6 +118,7 @@ class Bill extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
@@ -159,6 +162,7 @@ class Bill extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setMatchAttribute($value)
|
||||
{
|
||||
@@ -171,6 +175,7 @@ class Bill extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
{
|
||||
|
@@ -87,6 +87,7 @@ class Budget extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Budget
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Budget
|
||||
{
|
||||
@@ -115,6 +116,7 @@ class Budget extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
@@ -129,6 +131,8 @@ class Budget extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
{
|
||||
|
@@ -48,6 +48,7 @@ class BudgetLimit extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): BudgetLimit
|
||||
{
|
||||
|
@@ -86,6 +86,7 @@ class Category extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Category
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Category
|
||||
{
|
||||
@@ -105,6 +106,7 @@ class Category extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
@@ -119,6 +121,8 @@ class Category extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
{
|
||||
|
@@ -179,6 +179,7 @@ class ImportJob extends Model
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public function uploadFileContents(): string
|
||||
|
@@ -64,6 +64,7 @@ class PiggyBank extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return PiggyBank
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): PiggyBank
|
||||
{
|
||||
@@ -116,6 +117,7 @@ class PiggyBank extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value)
|
||||
{
|
||||
@@ -202,6 +204,8 @@ class PiggyBank extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setNameAttribute($value)
|
||||
{
|
||||
|
@@ -84,6 +84,8 @@ class Preference extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setDataAttribute($value)
|
||||
{
|
||||
|
@@ -52,6 +52,7 @@ class Rule extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Rule
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Rule
|
||||
{
|
||||
|
@@ -55,6 +55,7 @@ class RuleGroup extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return RuleGroup
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): RuleGroup
|
||||
{
|
||||
|
@@ -90,6 +90,7 @@ class Tag extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Tag
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Tag
|
||||
{
|
||||
@@ -109,6 +110,7 @@ class Tag extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getDescriptionAttribute($value)
|
||||
{
|
||||
@@ -125,6 +127,7 @@ class Tag extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getTagAttribute($value)
|
||||
{
|
||||
@@ -139,6 +142,8 @@ class Tag extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setDescriptionAttribute($value)
|
||||
{
|
||||
@@ -149,6 +154,7 @@ class Tag extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setTagAttribute($value)
|
||||
{
|
||||
|
@@ -137,6 +137,7 @@ class Transaction extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return Transaction
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): Transaction
|
||||
{
|
||||
|
@@ -57,6 +57,7 @@ class TransactionCurrency extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): TransactionCurrency
|
||||
{
|
||||
|
@@ -88,6 +88,7 @@ class TransactionJournal extends Model
|
||||
* @param string $value
|
||||
*
|
||||
* @return TransactionJournal
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $value): TransactionJournal
|
||||
{
|
||||
@@ -169,6 +170,7 @@ class TransactionJournal extends Model
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getDescriptionAttribute($value)
|
||||
{
|
||||
@@ -344,6 +346,8 @@ class TransactionJournal extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setDescriptionAttribute($value)
|
||||
{
|
||||
|
@@ -108,6 +108,8 @@ class TransactionJournalLink extends Model
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function setCommentAttribute($value): void
|
||||
{
|
||||
|
@@ -36,23 +36,23 @@ class TransactionType extends Model
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const WITHDRAWAL = 'Withdrawal';
|
||||
public const WITHDRAWAL = 'Withdrawal';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const DEPOSIT = 'Deposit';
|
||||
public const DEPOSIT = 'Deposit';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const TRANSFER = 'Transfer';
|
||||
public const TRANSFER = 'Transfer';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const OPENING_BALANCE = 'Opening balance';
|
||||
public const OPENING_BALANCE = 'Opening balance';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const RECONCILIATION = 'Reconciliation';
|
||||
public const RECONCILIATION = 'Reconciliation';
|
||||
/**
|
||||
* The attributes that should be casted to native types.
|
||||
*
|
||||
@@ -71,6 +71,7 @@ class TransactionType extends Model
|
||||
* @param string $type
|
||||
*
|
||||
* @return Model|null|static
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
public static function routeBinder(string $type): TransactionType
|
||||
{
|
||||
|
Reference in New Issue
Block a user