mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code cleanup.
This commit is contained in:
parent
1d2a4e707e
commit
da202317c0
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Config;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
/**
|
||||
@ -43,8 +42,9 @@ class UpgradeFireflyInstructions extends Command
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
$version = Config::get('firefly.version');
|
||||
$config = Config::get('upgrade.text');
|
||||
/** @var string $version */
|
||||
$version = config('firefly.version');
|
||||
$config = config('upgrade.text');
|
||||
$text = $config[$version] ?? null;
|
||||
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
|
@ -13,7 +13,6 @@ namespace FireflyIII\Console;
|
||||
|
||||
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
|
||||
use FireflyIII\Console\Commands\VerifyDatabase;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
/**
|
||||
|
@ -18,10 +18,10 @@ use FireflyIII\Models\Account;
|
||||
*/
|
||||
class EntryAccount
|
||||
{
|
||||
/** @var int */
|
||||
public $accountId;
|
||||
/** @var string */
|
||||
public $iban;
|
||||
/** @var int */
|
||||
public $id;
|
||||
/** @var string */
|
||||
public $name;
|
||||
/** @var int */
|
||||
@ -36,10 +36,10 @@ class EntryAccount
|
||||
*/
|
||||
public function __construct(Account $account)
|
||||
{
|
||||
$this->id = $account->id;
|
||||
$this->name = $account->name;
|
||||
$this->iban = $account->iban;
|
||||
$this->type = $account->accountType->type;
|
||||
$this->number = $account->getMeta('accountNumber');
|
||||
$this->accountId = $account->id;
|
||||
$this->name = $account->name;
|
||||
$this->iban = $account->iban;
|
||||
$this->type = $account->accountType->type;
|
||||
$this->number = $account->getMeta('accountNumber');
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ use FireflyIII\Models\Bill;
|
||||
class EntryBill
|
||||
{
|
||||
/** @var string */
|
||||
public $id = '';
|
||||
public $billId = '';
|
||||
/** @var string */
|
||||
public $name = '';
|
||||
|
||||
@ -31,8 +31,8 @@ class EntryBill
|
||||
public function __construct(Bill $bill = null)
|
||||
{
|
||||
if (!is_null($bill)) {
|
||||
$this->id = $bill->id;
|
||||
$this->name = $bill->name;
|
||||
$this->billId = $bill->id;
|
||||
$this->name = $bill->name;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ use FireflyIII\Models\Budget;
|
||||
class EntryBudget
|
||||
{
|
||||
/** @var string */
|
||||
public $id = '';
|
||||
public $budgetId = '';
|
||||
/** @var string */
|
||||
public $name = '';
|
||||
|
||||
@ -31,8 +31,8 @@ class EntryBudget
|
||||
public function __construct(Budget $budget = null)
|
||||
{
|
||||
if (!is_null($budget)) {
|
||||
$this->id = $budget->id;
|
||||
$this->name = $budget->name;
|
||||
$this->budgetId = $budget->id;
|
||||
$this->name = $budget->name;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ use FireflyIII\Models\Category;
|
||||
class EntryCategory
|
||||
{
|
||||
/** @var string */
|
||||
public $id = '';
|
||||
public $categoryId = '';
|
||||
/** @var string */
|
||||
public $name = '';
|
||||
|
||||
@ -31,8 +31,8 @@ class EntryCategory
|
||||
public function __construct(Category $category = null)
|
||||
{
|
||||
if (!is_null($category)) {
|
||||
$this->id = $category->id;
|
||||
$this->name = $category->name;
|
||||
$this->categoryId = $category->id;
|
||||
$this->name = $category->name;
|
||||
}
|
||||
}
|
||||
}
|
@ -69,10 +69,10 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
||||
foreach ($this->getEntries() as $entry) {
|
||||
// order is defined in Entry::getFieldsAndTypes.
|
||||
$rows[] = [
|
||||
$entry->description, $entry->amount, $entry->date, $entry->sourceAccount->id, $entry->sourceAccount->name, $entry->sourceAccount->iban,
|
||||
$entry->sourceAccount->type, $entry->sourceAccount->number, $entry->destinationAccount->id, $entry->destinationAccount->name,
|
||||
$entry->destinationAccount->iban, $entry->destinationAccount->type, $entry->destinationAccount->number, $entry->budget->id,
|
||||
$entry->budget->name, $entry->category->id, $entry->category->name, $entry->bill->id, $entry->bill->name,
|
||||
$entry->description, $entry->amount, $entry->date, $entry->sourceAccount->accountId, $entry->sourceAccount->name, $entry->sourceAccount->iban,
|
||||
$entry->sourceAccount->type, $entry->sourceAccount->number, $entry->destinationAccount->accountId, $entry->destinationAccount->name,
|
||||
$entry->destinationAccount->iban, $entry->destinationAccount->type, $entry->destinationAccount->number, $entry->budget->budgetId,
|
||||
$entry->budget->name, $entry->category->categoryId, $entry->category->name, $entry->bill->billId, $entry->bill->name,
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Export;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Export\Entry\Entry;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalCollector;
|
||||
use Illuminate\Filesystem\FilesystemAdapter;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Storage;
|
||||
@ -174,10 +174,7 @@ class Processor
|
||||
$zip->close();
|
||||
|
||||
// delete the files:
|
||||
foreach ($this->getFiles() as $file) {
|
||||
Log::debug('Will now delete file "' . $file . '".');
|
||||
$disk->delete($file);
|
||||
}
|
||||
$this->deleteFiles($disk);
|
||||
Log::debug('Done!');
|
||||
|
||||
return true;
|
||||
@ -188,7 +185,7 @@ class Processor
|
||||
*/
|
||||
public function exportJournals(): bool
|
||||
{
|
||||
$exporterClass = Config::get('firefly.export_formats.' . $this->exportFormat);
|
||||
$exporterClass = config('firefly.export_formats.' . $this->exportFormat);
|
||||
$exporter = app($exporterClass, [$this->job]);
|
||||
Log::debug('Going to export ' . $this->exportEntries->count() . ' export entries into ' . $this->exportFormat . ' format.');
|
||||
$exporter->setEntries($this->exportEntries);
|
||||
@ -206,4 +203,16 @@ class Processor
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FilesystemAdapter $disk
|
||||
*/
|
||||
private function deleteFiles(FilesystemAdapter $disk)
|
||||
{
|
||||
Log::debug('Class of $disk: ' . get_class($disk));
|
||||
foreach ($this->getFiles() as $file) {
|
||||
Log::debug('Will now delete file "' . $file . '".');
|
||||
$disk->delete($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,11 +54,7 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
|
||||
public function single(Bill $bill, Collection $entries): array
|
||||
{
|
||||
$format = (string)trans('config.month');
|
||||
$data = [
|
||||
'count' => 3,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
$data = ['count' => 3, 'labels' => [], 'datasets' => [],];
|
||||
$minAmount = [];
|
||||
$maxAmount = [];
|
||||
$actualAmount = [];
|
||||
@ -67,9 +63,7 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
|
||||
$data['labels'][] = $entry->date->formatLocalized($format);
|
||||
$minAmount[] = round($bill->amount_min, 2);
|
||||
$maxAmount[] = round($bill->amount_max, 2);
|
||||
/*
|
||||
* journalAmount has been collected in BillRepository::getJournals
|
||||
*/
|
||||
// journalAmount has been collected in BillRepository::getJournals
|
||||
$actualAmount[] = round(TransactionJournal::amountPositive($entry), 2);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\Budget;
|
||||
|
||||
|
||||
use Config;
|
||||
use Illuminate\Support\Collection;
|
||||
use Navigation;
|
||||
use Preferences;
|
||||
@ -25,7 +24,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface
|
||||
public function budgetLimit(Collection $entries, string $dateFormat = 'monthAndDay'): array
|
||||
{
|
||||
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
|
||||
$format = Config::get('firefly.' . $dateFormat . '.' . $language);
|
||||
$format = config('firefly.' . $dateFormat . '.' . $language);
|
||||
|
||||
$data = [
|
||||
'labels' => [],
|
||||
|
@ -20,8 +20,6 @@ class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
|
||||
*/
|
||||
public function all(Collection $entries): array
|
||||
{
|
||||
|
||||
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [],
|
||||
@ -116,18 +114,9 @@ class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
|
||||
*/
|
||||
public function multiYear(Collection $entries): array
|
||||
{
|
||||
// dataset:
|
||||
$data = [
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
// get labels from one of the categories (assuming there's at least one):
|
||||
$first = $entries->first();
|
||||
$keys = array_keys($first['spent']);
|
||||
foreach ($keys as $year) {
|
||||
$data['labels'][] = strval($year);
|
||||
}
|
||||
$data = ['count' => 0, 'labels' => array_keys($first['spent']), 'datasets' => [],];
|
||||
|
||||
// then, loop all entries and create datasets:
|
||||
foreach ($entries as $entry) {
|
||||
@ -144,7 +133,6 @@ class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,11 +74,7 @@ class UserConfirmation
|
||||
private function doConfirm(User $user, string $ipAddress)
|
||||
{
|
||||
Log::debug('Trigger UserConfirmation::doConfirm');
|
||||
|
||||
// if user must confirm account, send email
|
||||
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
|
||||
|
||||
// otherwise, auto-confirm:
|
||||
if ($confirmAccount === false) {
|
||||
Log::debug('Confirm account is false, so user will be auto-confirmed.');
|
||||
Preferences::setForUser($user, 'user_confirmed', true);
|
||||
@ -87,19 +83,12 @@ class UserConfirmation
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// send email message:
|
||||
$email = $user->email;
|
||||
$code = str_random(16);
|
||||
$route = route('do_confirm_account', [$code]);
|
||||
|
||||
// set preferences:
|
||||
Preferences::setForUser($user, 'user_confirmed', false);
|
||||
Preferences::setForUser($user, 'user_confirmed_last_mail', time());
|
||||
Preferences::setForUser($user, 'user_confirmed_code', $code);
|
||||
Log::debug('Set preferences for user.');
|
||||
|
||||
// send email.
|
||||
try {
|
||||
Log::debug('Now in try block for user email message thing to ' . $email . '.');
|
||||
Mail::send(
|
||||
@ -109,7 +98,6 @@ class UserConfirmation
|
||||
}
|
||||
);
|
||||
} catch (Swift_TransportException $e) {
|
||||
|
||||
Log::error($e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
Log::debug('Caught general exception.');
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Attachments;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use Crypt;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@ -39,8 +38,8 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->maxUploadSize = Config::get('firefly.maxUploadSize');
|
||||
$this->allowedMimes = Config::get('firefly.allowedMimes');
|
||||
$this->maxUploadSize = config('firefly.maxUploadSize');
|
||||
$this->allowedMimes = config('firefly.allowedMimes');
|
||||
$this->errors = new MessageBag;
|
||||
$this->messages = new MessageBag;
|
||||
$this->uploadDisk = Storage::disk('upload');
|
||||
@ -81,26 +80,14 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model): bool
|
||||
{
|
||||
$files = null;
|
||||
try {
|
||||
if (Input::hasFile('attachments')) {
|
||||
$files = Input::file('attachments');
|
||||
}
|
||||
} catch (TypeError $e) {
|
||||
// Log it, do nothing else.
|
||||
Log::error($e->getMessage());
|
||||
$files = $this->getFiles();
|
||||
|
||||
if (!is_null($files) && !is_array($files)) {
|
||||
$this->processFile($files, $model);
|
||||
}
|
||||
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $entry) {
|
||||
if (!is_null($entry)) {
|
||||
$this->processFile($entry, $model);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!is_null($files)) {
|
||||
$this->processFile($files, $model);
|
||||
}
|
||||
$this->processFiles($files, $model);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -234,5 +221,37 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|null|UploadedFile
|
||||
*/
|
||||
private function getFiles()
|
||||
{
|
||||
$files = null;
|
||||
try {
|
||||
if (Input::hasFile('attachments')) {
|
||||
$files = Input::file('attachments');
|
||||
}
|
||||
} catch (TypeError $e) {
|
||||
// Log it, do nothing else.
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $files
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function processFiles(array $files, Model $model): bool
|
||||
{
|
||||
foreach ($files as $entry) {
|
||||
if (!is_null($entry)) {
|
||||
$this->processFile($entry, $model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Events\TransactionJournalStored;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Csv\Converter\ConverterInterface;
|
||||
@ -219,8 +218,8 @@ class Importer
|
||||
$data = $this->getFiller(); // These fields are necessary to create a new transaction journal. Some are optional
|
||||
foreach ($row as $index => $value) {
|
||||
$role = $this->roles[$index] ?? '_ignore';
|
||||
$class = Config::get('csv.roles.' . $role . '.converter');
|
||||
$field = Config::get('csv.roles.' . $role . '.field');
|
||||
$class = config('csv.roles.' . $role . '.converter');
|
||||
$field = config('csv.roles.' . $role . '.field');
|
||||
|
||||
Log::debug('Column #' . $index . ' (role: ' . $role . ') : converter ' . $class . ' stores its data into field ' . $field . ':');
|
||||
|
||||
@ -282,7 +281,7 @@ class Importer
|
||||
}
|
||||
|
||||
|
||||
$set = Config::get('csv.post_processors');
|
||||
$set = config('csv.post_processors');
|
||||
foreach ($set as $className) {
|
||||
/** @var PostProcessorInterface $postProcessor */
|
||||
$postProcessor = app('FireflyIII\Helpers\Csv\PostProcessing\\' . $className);
|
||||
@ -356,7 +355,7 @@ class Importer
|
||||
private function getFiller()
|
||||
{
|
||||
$filler = [];
|
||||
foreach (Config::get('csv.roles') as $role) {
|
||||
foreach (config('csv.roles') as $role) {
|
||||
if (isset($role['field'])) {
|
||||
$fieldName = $role['field'];
|
||||
$filler[$fieldName] = null;
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use Crypt;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Csv\Mapper\MapperInterface;
|
||||
@ -61,7 +60,7 @@ class Wizard implements WizardInterface
|
||||
*/
|
||||
public function processSelectedMapping(array $roles, array $map): array
|
||||
{
|
||||
$configRoles = Config::get('csv.roles');
|
||||
$configRoles = config('csv.roles');
|
||||
$maps = [];
|
||||
|
||||
|
||||
@ -134,7 +133,7 @@ class Wizard implements WizardInterface
|
||||
$options = [];
|
||||
foreach ($map as $index => $columnRole) {
|
||||
|
||||
$mapper = Config::get('csv.roles.' . $columnRole . '.mapper');
|
||||
$mapper = config('csv.roles.' . $columnRole . '.mapper');
|
||||
if (is_null($mapper)) {
|
||||
throw new FireflyException('Cannot map field of type "' . $columnRole . '".');
|
||||
}
|
||||
|
@ -104,33 +104,33 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
{
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
$set = Auth::user()->tags()
|
||||
->leftJoin('tag_transaction_journal', 'tag_transaction_journal.tag_id', '=', 'tags.id')
|
||||
->leftJoin('transaction_journals', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id')
|
||||
->leftJoin(
|
||||
'transactions AS t_source', function (JoinClause $join) {
|
||||
$join->on('transaction_journals.id', '=', 't_source.transaction_journal_id')->where('t_source.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin(
|
||||
'transactions AS t_destination', function (JoinClause $join) {
|
||||
$join->on('transaction_journals.id', '=', 't_destination.transaction_journal_id')->where('t_destination.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
->where('tags.tagMode', 'balancingAct')
|
||||
->where('transaction_types.type', TransactionType::TRANSFER)
|
||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->whereIn('t_source.account_id', $ids)
|
||||
->whereIn('t_destination.account_id', $ids)
|
||||
->groupBy('t_destination.account_id')
|
||||
->get(
|
||||
[
|
||||
't_destination.account_id',
|
||||
DB::raw('SUM(`t_destination`.`amount`) as `sum`'),
|
||||
]
|
||||
);
|
||||
->leftJoin('tag_transaction_journal', 'tag_transaction_journal.tag_id', '=', 'tags.id')
|
||||
->leftJoin('transaction_journals', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id')
|
||||
->leftJoin(
|
||||
'transactions AS t_source', function (JoinClause $join) {
|
||||
$join->on('transaction_journals.id', '=', 't_source.transaction_journal_id')->where('t_source.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
->leftJoin(
|
||||
'transactions AS t_destination', function (JoinClause $join) {
|
||||
$join->on('transaction_journals.id', '=', 't_destination.transaction_journal_id')->where('t_destination.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
->where('tags.tagMode', 'balancingAct')
|
||||
->where('transaction_types.type', TransactionType::TRANSFER)
|
||||
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->whereIn('t_source.account_id', $ids)
|
||||
->whereIn('t_destination.account_id', $ids)
|
||||
->groupBy('t_destination.account_id')
|
||||
->get(
|
||||
[
|
||||
't_destination.account_id',
|
||||
DB::raw('SUM(`t_destination`.`amount`) as `sum`'),
|
||||
]
|
||||
);
|
||||
|
||||
return $set;
|
||||
}
|
||||
@ -178,7 +178,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return BalanceLine
|
||||
*/
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Http\Requests\AccountFormRequest;
|
||||
use FireflyIII\Models\Account;
|
||||
@ -40,7 +39,7 @@ class AccountController extends Controller
|
||||
{
|
||||
|
||||
|
||||
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $what);
|
||||
$subTitle = trans('firefly.make_new_' . $what . '_account');
|
||||
Session::flash('preFilled', []);
|
||||
|
||||
@ -64,7 +63,7 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function delete(ARI $repository, Account $account)
|
||||
{
|
||||
$typeName = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$typeName = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]);
|
||||
$accountList = ExpandedForm::makeSelectList($repository->getAccounts([$account->accountType->type]), true);
|
||||
unset($accountList[$account->id]);
|
||||
@ -86,7 +85,7 @@ class AccountController extends Controller
|
||||
public function destroy(ARI $repository, Account $account)
|
||||
{
|
||||
$type = $account->accountType->type;
|
||||
$typeName = Config::get('firefly.shortNamesByFullName.' . $type);
|
||||
$typeName = config('firefly.shortNamesByFullName.' . $type);
|
||||
$name = $account->name;
|
||||
$moveTo = $repository->find(intval(Input::get('move_account_before_delete')));
|
||||
|
||||
@ -107,9 +106,9 @@ class AccountController extends Controller
|
||||
public function edit(ARI $repository, Account $account)
|
||||
{
|
||||
|
||||
$what = Config::get('firefly.shortNamesByFullName')[$account->accountType->type];
|
||||
$what = config('firefly.shortNamesByFullName')[$account->accountType->type];
|
||||
$subTitle = trans('firefly.edit_' . $what . '_account', ['name' => $account->name]);
|
||||
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $what);
|
||||
$openingBalance = $repository->openingBalanceTransaction($account);
|
||||
|
||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||
@ -155,8 +154,8 @@ class AccountController extends Controller
|
||||
$what = $what ?? 'asset';
|
||||
|
||||
$subTitle = trans('firefly.' . $what . '_accounts');
|
||||
$subTitleIcon = Config::get('firefly.subIconsByIdentifier.' . $what);
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.' . $what);
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $what);
|
||||
$types = config('firefly.accountTypesByIdentifier.' . $what);
|
||||
$accounts = $repository->getAccounts($types);
|
||||
/** @var Carbon $start */
|
||||
$start = clone session('start', Carbon::now()->startOfMonth());
|
||||
@ -190,8 +189,8 @@ class AccountController extends Controller
|
||||
{
|
||||
$page = intval(Input::get('page')) == 0 ? 1 : intval(Input::get('page'));
|
||||
$pageSize = Preferences::get('transactionPageSize', 50)->data;
|
||||
$subTitleIcon = Config::get('firefly.subTitlesByIdentifier.' . $account->accountType->type);
|
||||
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$subTitleIcon = config('firefly.subTitlesByIdentifier.' . $account->accountType->type);
|
||||
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$journals = $repository->getJournals($account, $page, $pageSize);
|
||||
$subTitle = trans('firefly.details_for_' . $what, ['name' => $account->name]);
|
||||
$journals->setPath('accounts/show/' . $account->id);
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Events\ResendConfirmation;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
@ -48,7 +47,7 @@ class ConfirmationController extends Controller
|
||||
$database = Preferences::get('user_confirmed_code')->data;
|
||||
$time = Preferences::get('user_confirmed_last_mail', 0)->data;
|
||||
$now = time();
|
||||
$maxDiff = Config::get('firefly.confirmation_age');
|
||||
$maxDiff = config('firefly.confirmation_age');
|
||||
|
||||
if ($database === $code && ($now - $time <= $maxDiff)) {
|
||||
Preferences::setForUser(Auth::user(), 'user_confirmed', true);
|
||||
@ -68,7 +67,7 @@ class ConfirmationController extends Controller
|
||||
{
|
||||
$time = Preferences::get('user_confirmed_last_mail', 0)->data;
|
||||
$now = time();
|
||||
$maxDiff = Config::get('firefly.resend_confirmation');
|
||||
$maxDiff = config('firefly.resend_confirmation');
|
||||
$owner = env('SITE_OWNER', 'mail@example.com');
|
||||
if ($now - $time > $maxDiff) {
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Config;
|
||||
use FireflyIII\Http\Requests\BillFormRequest;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@ -34,7 +33,7 @@ class BillController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$periods = Config::get('firefly.periods_to_text');
|
||||
$periods = config('firefly.periods_to_text');
|
||||
$subTitle = trans('firefly.create_new_bill');
|
||||
|
||||
|
||||
@ -89,7 +88,7 @@ class BillController extends Controller
|
||||
*/
|
||||
public function edit(Bill $bill)
|
||||
{
|
||||
$periods = Config::get('firefly.periods_to_text');
|
||||
$periods = config('firefly.periods_to_text');
|
||||
$subTitle = trans('firefly.edit_bill', ['name' => $bill->name]);
|
||||
|
||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||
|
@ -163,8 +163,6 @@ class BudgetController extends Controller
|
||||
/**
|
||||
* Warn user if necessary
|
||||
*/
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$repeatFreq = Config::get('firefly.range_to_repeat_freq.' . $range);
|
||||
$userWarning = '';
|
||||
if (session('is_custom_range', false) === true) {
|
||||
$userWarning = strval(trans('firefly.warn_range_' . $repeatFreq));
|
||||
|
@ -9,8 +9,8 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
||||
use FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface as SCRI;
|
||||
use FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface;
|
||||
use FireflyIII\Repositories\Category\SingleCategoryRepositoryInterface as SCRI;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
use Navigation;
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Config;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Csv\Data;
|
||||
@ -39,7 +38,7 @@ class CsvController extends Controller
|
||||
View::share('title', trans('firefly.csv'));
|
||||
View::share('mainTitleIcon', 'fa-file-text-o');
|
||||
|
||||
if (Config::get('firefly.csv_import_enabled') === false) {
|
||||
if (config('firefly.csv_import_enabled') === false) {
|
||||
throw new FireflyException('CSV Import is not enabled.');
|
||||
}
|
||||
|
||||
@ -81,7 +80,7 @@ class CsvController extends Controller
|
||||
if ($this->data->hasHeaders()) {
|
||||
$headers = $firstRow;
|
||||
}
|
||||
$keys = array_keys(Config::get('csv.roles'));
|
||||
$keys = array_keys(config('csv.roles'));
|
||||
foreach ($keys as $name) {
|
||||
$availableRoles[$name] = trans('firefly.csv_column_' . $name);
|
||||
}
|
||||
@ -179,7 +178,7 @@ class CsvController extends Controller
|
||||
|
||||
// get list of supported specifix
|
||||
$specifix = [];
|
||||
foreach (Config::get('csv.specifix') as $entry) {
|
||||
foreach (config('csv.specifix') as $entry) {
|
||||
$specifix[$entry] = trans('firefly.csv_specifix_' . $entry);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Export\Processor;
|
||||
@ -106,8 +105,8 @@ class ExportController extends Controller
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
$accountList = ExpandedForm::makeSelectList($accounts);
|
||||
$checked = array_keys($accountList);
|
||||
$formats = array_keys(Config::get('firefly.export_formats'));
|
||||
$defaultFormat = Preferences::get('export_format', Config::get('firefly.default_export_format'))->data;
|
||||
$formats = array_keys(config('firefly.export_formats'));
|
||||
$defaultFormat = Preferences::get('export_format', config('firefly.default_export_format'))->data;
|
||||
$first = session('first')->format('Y-m-d');
|
||||
$today = Carbon::create()->format('Y-m-d');
|
||||
|
||||
|
@ -3,13 +3,11 @@
|
||||
use Amount;
|
||||
use Artisan;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use Input;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Route;
|
||||
use Session;
|
||||
@ -34,9 +32,9 @@ class HomeController extends Controller
|
||||
public function dateRange()
|
||||
{
|
||||
|
||||
$start = new Carbon(Input::get('start'));
|
||||
$end = new Carbon(Input::get('end'));
|
||||
$label = Input::get('label');
|
||||
$start = new Carbon(Input::get('start'));
|
||||
$end = new Carbon(Input::get('end'));
|
||||
$label = Input::get('label');
|
||||
|
||||
// check if the label is "everything" or "Custom range" which will betray
|
||||
// a possible problem with the budgets.
|
||||
@ -101,7 +99,7 @@ class HomeController extends Controller
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
{
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
||||
$types = config('firefly.accountTypesByIdentifier.asset');
|
||||
$count = $repository->countAccounts($types);
|
||||
|
||||
if ($count == 0) {
|
||||
@ -168,7 +166,7 @@ class HomeController extends Controller
|
||||
$methods = $route->getMethods();
|
||||
|
||||
if (!is_null($name) && in_array('GET', $methods) && !$this->startsWithAny($ignore, $name)) {
|
||||
foreach (array_keys(Config::get('firefly.languages')) as $lang) {
|
||||
foreach (array_keys(config('firefly.languages')) as $lang) {
|
||||
echo 'touch ' . $lang . '/' . $name . '.md<br>';
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use Amount;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Report\ReportQueryInterface;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
@ -36,7 +35,7 @@ class JsonController extends Controller
|
||||
public function action()
|
||||
{
|
||||
$count = intval(Input::get('count')) > 0 ? intval(Input::get('count')) : 1;
|
||||
$keys = array_keys(Config::get('firefly.rule-actions'));
|
||||
$keys = array_keys(config('firefly.rule-actions'));
|
||||
$actions = [];
|
||||
foreach ($keys as $key) {
|
||||
$actions[$key] = trans('firefly.rule_action_' . $key . '_choice');
|
||||
@ -297,7 +296,7 @@ class JsonController extends Controller
|
||||
public function trigger()
|
||||
{
|
||||
$count = intval(Input::get('count')) > 0 ? intval(Input::get('count')) : 1;
|
||||
$keys = array_keys(Config::get('firefly.rule-triggers'));
|
||||
$keys = array_keys(config('firefly.rule-triggers'));
|
||||
$triggers = [];
|
||||
foreach ($keys as $key) {
|
||||
if ($key != 'user_action') {
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use FireflyIII\Http\Requests\NewUserFormRequest;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use Preferences;
|
||||
@ -36,7 +35,7 @@ class NewUserController extends Controller
|
||||
View::share('mainTitleIcon', 'fa-fire');
|
||||
|
||||
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
||||
$types = config('firefly.accountTypesByIdentifier.asset');
|
||||
$count = $repository->countAccounts($types);
|
||||
|
||||
if ($count > 0) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use Amount;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Http\Requests\PiggyBankFormRequest;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
@ -65,7 +64,7 @@ class PiggyBankController extends Controller
|
||||
public function create(ARI $repository)
|
||||
{
|
||||
|
||||
$periods = Config::get('firefly.piggy_bank_periods');
|
||||
$periods = config('firefly.piggy_bank_periods');
|
||||
$accounts = ExpandedForm::makeSelectList($repository->getAccounts(['Default account', 'Asset account']));
|
||||
$subTitle = trans('firefly.new_piggy_bank');
|
||||
$subTitleIcon = 'fa-plus';
|
||||
@ -124,7 +123,7 @@ class PiggyBankController extends Controller
|
||||
public function edit(ARI $repository, PiggyBank $piggyBank)
|
||||
{
|
||||
|
||||
$periods = Config::get('firefly.piggy_bank_periods');
|
||||
$periods = config('firefly.piggy_bank_periods');
|
||||
$accounts = ExpandedForm::makeSelectList($repository->getAccounts(['Default account', 'Asset account']));
|
||||
$subTitle = trans('firefly.update_piggy_title', ['name' => $piggyBank->name]);
|
||||
$subTitleIcon = 'fa-pencil';
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Http\Requests\TokenFormRequest;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use Input;
|
||||
@ -155,7 +154,7 @@ class PreferencesController extends Controller
|
||||
|
||||
// language:
|
||||
$lang = Input::get('language');
|
||||
if (in_array($lang, array_keys(Config::get('firefly.languages')))) {
|
||||
if (in_array($lang, array_keys(config('firefly.languages')))) {
|
||||
Preferences::set('language', $lang);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Http\Requests\RuleFormRequest;
|
||||
use FireflyIII\Http\Requests\TestRuleFormRequest;
|
||||
use FireflyIII\Models\Rule;
|
||||
@ -292,8 +291,8 @@ class RuleController extends Controller
|
||||
return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]);
|
||||
}
|
||||
|
||||
$limit = Config::get('firefly.test-triggers.limit');
|
||||
$range = Config::get('firefly.test-triggers.range');
|
||||
$limit = config('firefly.test-triggers.limit');
|
||||
$range = config('firefly.test-triggers.range');
|
||||
|
||||
/** @var TransactionMatcher $matcher */
|
||||
$matcher = app('FireflyIII\Rules\TransactionMatcher');
|
||||
|
@ -3,7 +3,6 @@
|
||||
use Amount;
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use ExpandedForm;
|
||||
use FireflyIII\Events\TransactionJournalStored;
|
||||
use FireflyIII\Events\TransactionJournalUpdated;
|
||||
@ -212,8 +211,8 @@ class TransactionController extends Controller
|
||||
public function index(JournalRepositoryInterface $repository, string $what)
|
||||
{
|
||||
$pageSize = Preferences::get('transactionPageSize', 50)->data;
|
||||
$subTitleIcon = Config::get('firefly.transactionIconsByWhat.' . $what);
|
||||
$types = Config::get('firefly.transactionTypesByWhat.' . $what);
|
||||
$subTitleIcon = config('firefly.transactionIconsByWhat.' . $what);
|
||||
$types = config('firefly.transactionTypesByWhat.' . $what);
|
||||
$subTitle = trans('firefly.title_' . $what);
|
||||
$page = intval(Input::get('page'));
|
||||
$journals = $repository->getJournalsOfTypes($types, $page, $pageSize);
|
||||
|
@ -4,7 +4,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Models\Account;
|
||||
use Input;
|
||||
|
||||
@ -30,9 +29,9 @@ class AccountFormRequest extends Request
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
$accountRoles = join(',', array_keys(Config::get('firefly.accountRoles')));
|
||||
$types = join(',', array_keys(Config::get('firefly.subTitlesByIdentifier')));
|
||||
$ccPaymentTypes = join(',', array_keys(Config::get('firefly.ccTypes')));
|
||||
$accountRoles = join(',', array_keys(config('firefly.accountRoles')));
|
||||
$types = join(',', array_keys(config('firefly.subTitlesByIdentifier')));
|
||||
$ccPaymentTypes = join(',', array_keys(config('firefly.ccTypes')));
|
||||
|
||||
$nameRule = 'required|min:1|uniqueAccountForUser';
|
||||
$idRule = '';
|
||||
|
@ -11,7 +11,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use Input;
|
||||
|
||||
@ -38,11 +37,11 @@ class RuleFormRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
|
||||
$validTriggers = array_keys(Config::get('firefly.rule-triggers'));
|
||||
$validActions = array_keys(Config::get('firefly.rule-actions'));
|
||||
$validTriggers = array_keys(config('firefly.rule-triggers'));
|
||||
$validActions = array_keys(config('firefly.rule-actions'));
|
||||
|
||||
// some actions require text:
|
||||
$contextActions = join(',', Config::get('firefly.rule-actions-text'));
|
||||
$contextActions = join(',', config('firefly.rule-actions-text'));
|
||||
|
||||
$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title';
|
||||
if (RuleGroup::find(Input::get('id'))) {
|
||||
|
@ -20,7 +20,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Http\Requests;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
|
||||
/**
|
||||
* Class RuleFormRequest
|
||||
@ -45,7 +44,7 @@ class TestRuleFormRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
|
||||
$validTriggers = array_keys(Config::get('firefly.rule-triggers'));
|
||||
$validTriggers = array_keys(config('firefly.rule-triggers'));
|
||||
$rules = [
|
||||
'rule-trigger.*' => 'required|min:1|in:' . join(',', $validTriggers),
|
||||
'rule-trigger-value.*' => 'required|min:1|ruleTriggerValue',
|
||||
|
@ -55,7 +55,7 @@ Breadcrumbs::register(
|
||||
Breadcrumbs::register(
|
||||
'accounts.show', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
|
||||
|
||||
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
|
||||
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
@ -73,7 +73,7 @@ Breadcrumbs::register(
|
||||
Breadcrumbs::register(
|
||||
'accounts.edit', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
$what = Config::get('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
|
||||
$breadcrumbs->push(trans('firefly.edit_' . $what . '_account', ['name' => e($account->name)]), route('accounts.edit', [$account->id]));
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Providers;
|
||||
|
||||
use Config;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Log;
|
||||
|
||||
@ -34,7 +33,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
// make sure the logger doesn't log everything when it doesn't need to.
|
||||
$monolog = Log::getMonolog();
|
||||
foreach ($monolog->getHandlers() as $handler) {
|
||||
$handler->setLevel(Config::get('app.log-level'));
|
||||
$handler->setLevel(config('app.log-level'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace FireflyIII\Repositories\Account;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use DB;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
@ -614,7 +613,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
*/
|
||||
protected function storeAccount(array $data): Account
|
||||
{
|
||||
$type = Config::get('firefly.accountTypeByIdentifier.' . $data['accountType']);
|
||||
$type = config('firefly.accountTypeByIdentifier.' . $data['accountType']);
|
||||
$accountType = AccountType::whereType($type)->first();
|
||||
$newAccount = new Account(
|
||||
[
|
||||
|
@ -4,7 +4,6 @@ declare(strict_types = 1);
|
||||
namespace FireflyIII\Repositories\Budget;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Config;
|
||||
use DB;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Budget;
|
||||
@ -870,7 +869,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
||||
// there might be a budget limit for this startdate:
|
||||
|
||||
$viewRange = Preferences::get('viewRange', '1M')->data;
|
||||
$repeatFreq = Config::get('firefly.range_to_repeat_freq.' . $viewRange);
|
||||
$repeatFreq = config('firefly.range_to_repeat_freq.' . $viewRange);
|
||||
/** @var BudgetLimit $limit */
|
||||
$limit = $budget->budgetlimits()->where('budget_limits.startdate', $date)->where('budget_limits.repeat_freq', $repeatFreq)->first(['budget_limits.*']);
|
||||
|
||||
|
@ -18,8 +18,8 @@ interface RuleGroupRepositoryInterface
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count(): int;
|
||||
|
@ -3,7 +3,6 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Repositories\Tag;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
|
@ -40,7 +40,7 @@ interface UserRepositoryInterface
|
||||
|
||||
/**
|
||||
* Returns a count of all users.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count(): int;
|
||||
|
@ -10,8 +10,6 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Support;
|
||||
|
||||
use Config;
|
||||
|
||||
/**
|
||||
* Class Domain
|
||||
*
|
||||
@ -24,7 +22,7 @@ class Domain
|
||||
*/
|
||||
public static function getBindables(): array
|
||||
{
|
||||
return Config::get('firefly.bindables');
|
||||
return config('firefly.bindables');
|
||||
|
||||
}
|
||||
|
||||
@ -33,7 +31,7 @@ class Domain
|
||||
*/
|
||||
public static function getRuleActions(): array
|
||||
{
|
||||
return Config::get('firefly.rule-actions');
|
||||
return config('firefly.rule-actions');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,6 +39,6 @@ class Domain
|
||||
*/
|
||||
public static function getRuleTriggers(): array
|
||||
{
|
||||
return Config::get('firefly.rule-triggers');
|
||||
return config('firefly.rule-triggers');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user