mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 17:31:09 -06:00
Fix tests.
This commit is contained in:
parent
a722dc4235
commit
ea2c48bca5
@ -467,10 +467,14 @@ class AccountController extends Controller
|
||||
|
||||
/** @var CurrencyRepositoryInterface $repository */
|
||||
$repository = app(CurrencyRepositoryInterface::class);
|
||||
$default = app('amount')->getDefaultCurrency();
|
||||
$chartData = [];
|
||||
/** @var AccountRepositoryInterface $accountRepos */
|
||||
$accountRepos = app(AccountRepositoryInterface::class);
|
||||
|
||||
$default = app('amount')->getDefaultCurrency();
|
||||
$chartData = [];
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$currency = $repository->findNull((int)$account->getMeta('currency_id'));
|
||||
$currency = $repository->findNull((int)$accountRepos->getMetaValue($account, 'currency_id'));
|
||||
if (null === $currency) {
|
||||
$currency = $default;
|
||||
}
|
||||
|
@ -139,10 +139,10 @@ class Bill extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value): string
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
if (1 === (int)$this->name_encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@ -96,10 +96,10 @@ class Budget extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value): string
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
if ($this->encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@ -85,10 +85,10 @@ class Category extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value): string
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
if ($this->encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@ -107,10 +107,10 @@ class PiggyBank extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getNameAttribute($value): string
|
||||
public function getNameAttribute($value): ?string
|
||||
{
|
||||
if ($this->encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@ -85,10 +85,10 @@ class Tag extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getDescriptionAttribute($value): string
|
||||
public function getDescriptionAttribute($value): ?string
|
||||
{
|
||||
if (null === $value) {
|
||||
return $value;
|
||||
|
@ -153,10 +153,10 @@ class TransactionJournal extends Model
|
||||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
* @throws \Illuminate\Contracts\Encryption\DecryptException
|
||||
*/
|
||||
public function getDescriptionAttribute($value): string
|
||||
public function getDescriptionAttribute($value): ?string
|
||||
{
|
||||
if ($this->encrypted) {
|
||||
return Crypt::decrypt($value);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Rules;
|
||||
namespace FireflyIII\TransactionRules\Triggers;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
|
Loading…
Reference in New Issue
Block a user