diff --git a/app/Console/Commands/CreateImport.php b/app/Console/Commands/CreateImport.php index b29d83e291..bfb52735e2 100644 --- a/app/Console/Commands/CreateImport.php +++ b/app/Console/Commands/CreateImport.php @@ -150,7 +150,9 @@ class CreateImport extends Command $this->error(sprintf('Error importing line #%d: %s', $index, $error)); } $this->line( - sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->lines) + sprintf( + 'The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->getLines() + ) ); } diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index 5f156c3e1f..65ae256332 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -85,8 +85,8 @@ class Import extends Command $monolog->pushHandler($handler); // actually start job: - $type = 'csv' === $job->file_type ? 'file' : $job->file_type; - $key = sprintf('import.routine.%s', $type); + $type = 'csv' === $job->file_type ? 'file' : $job->file_type; + $key = sprintf('import.routine.%s', $type); $className = config($key); if (null === $className || !class_exists($className)) { throw new FireflyException(sprintf('Cannot find import routine class for job of type "%s".', $type)); // @codeCoverageIgnore @@ -98,11 +98,13 @@ class Import extends Command $routine->run(); /** @var MessageBag $error */ - foreach ($routine->errors as $index => $error) { + foreach ($routine->getErrors() as $index => $error) { $this->error(sprintf('Error importing line #%d: %s', $index, $error)); } - $this->line(sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->journals->count(), $routine->lines)); + $this->line( + sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->getLines()) + ); return; } diff --git a/app/Export/Entry/Entry.php b/app/Export/Entry/Entry.php index 8819b726fc..63f0c5ea43 100644 --- a/app/Export/Entry/Entry.php +++ b/app/Export/Entry/Entry.php @@ -203,7 +203,7 @@ final class Entry $entry->description = $transaction->transaction_description . '(' . $transaction->description . ')'; } $entry->currency_code = $transaction->transactionCurrency->code; - $entry->amount = round($transaction->transaction_amount, $transaction->transactionCurrency->decimal_places); + $entry->amount = strval(round($transaction->transaction_amount, $transaction->transactionCurrency->decimal_places)); $entry->foreign_currency_code = null === $transaction->foreign_currency_id ? null : $transaction->foreignCurrency->code; $entry->foreign_amount = null === $transaction->foreign_currency_id @@ -216,14 +216,14 @@ final class Entry ); $entry->transaction_type = $transaction->transaction_type_type; - $entry->asset_account_id = $transaction->account_id; + $entry->asset_account_id = strval($transaction->account_id); $entry->asset_account_name = app('steam')->tryDecrypt($transaction->account_name); $entry->asset_account_iban = $transaction->account_iban; $entry->asset_account_number = $transaction->account_number; $entry->asset_account_bic = $transaction->account_bic; $entry->asset_currency_code = $transaction->account_currency_code; - $entry->opposing_account_id = $transaction->opposing_account_id; + $entry->opposing_account_id = strval($transaction->opposing_account_id); $entry->opposing_account_name = app('steam')->tryDecrypt($transaction->opposing_account_name); $entry->opposing_account_iban = $transaction->opposing_account_iban; $entry->opposing_account_number = $transaction->opposing_account_number; @@ -231,7 +231,7 @@ final class Entry $entry->opposing_currency_code = $transaction->opposing_currency_code; // budget - $entry->budget_id = $transaction->transaction_budget_id; + $entry->budget_id = strval($transaction->transaction_budget_id); $entry->budget_name = app('steam')->tryDecrypt($transaction->transaction_budget_name); if (null === $transaction->transaction_budget_id) { $entry->budget_id = $transaction->transaction_journal_budget_id; @@ -239,7 +239,7 @@ final class Entry } // category - $entry->category_id = $transaction->transaction_category_id; + $entry->category_id = strval($transaction->transaction_category_id); $entry->category_name = app('steam')->tryDecrypt($transaction->transaction_category_name); if (null === $transaction->transaction_category_id) { $entry->category_id = $transaction->transaction_journal_category_id; @@ -247,7 +247,7 @@ final class Entry } // budget - $entry->bill_id = $transaction->bill_id; + $entry->bill_id = strval($transaction->bill_id); $entry->bill_name = app('steam')->tryDecrypt($transaction->bill_name); $entry->tags = $transaction->tags; diff --git a/app/Export/Exporter/CsvExporter.php b/app/Export/Exporter/CsvExporter.php index e2703b0d20..012e4d6e2b 100644 --- a/app/Export/Exporter/CsvExporter.php +++ b/app/Export/Exporter/CsvExporter.php @@ -24,8 +24,6 @@ namespace FireflyIII\Export\Exporter; use FireflyIII\Export\Entry\Entry; use League\Csv\Writer; -use SplFileObject; -use SplTempFileObject; use Storage; /** @@ -66,12 +64,9 @@ class CsvExporter extends BasicExporter implements ExporterInterface $fullPath = storage_path('export') . DIRECTORY_SEPARATOR . $this->fileName; - //we create the CSV into memory - //$writer = Writer::createFromFileObject(new SplTempFileObject()); $writer = Writer::createFromPath($fullPath); - //$writer = Writer::createFromPath(new SplFileObject($fullPath, 'a+'), 'w'); - $rows = []; + $rows = []; // get field names for header row: $first = $this->getEntries()->first(); @@ -91,8 +86,6 @@ class CsvExporter extends BasicExporter implements ExporterInterface $rows[] = $line; } $writer->insertAll($rows); - //$writer->output($fullPath); - //$writer-> return true; } @@ -102,6 +95,6 @@ class CsvExporter extends BasicExporter implements ExporterInterface $this->fileName = $this->job->key . '-records.csv'; // touch file in export directory: $disk = Storage::disk('export'); - $disk->put($this->fileName,''); + $disk->put($this->fileName, ''); } } diff --git a/app/Generator/Report/Tag/MonthReportGenerator.php b/app/Generator/Report/Tag/MonthReportGenerator.php index 43a6899482..e1cdc808fc 100644 --- a/app/Generator/Report/Tag/MonthReportGenerator.php +++ b/app/Generator/Report/Tag/MonthReportGenerator.php @@ -65,6 +65,7 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface /** * @return string + * @throws \Throwable */ public function generate(): string { diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 6fcb3428eb..23f09fbfeb 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -76,6 +76,7 @@ class UserEventHandler { Log::debug('In checkSingleUserIsAdmin'); + /** @var User $user */ $user = $event->user; $count = User::count(); diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 612af9f13b..6753f1d9a6 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -26,7 +26,6 @@ namespace FireflyIII\Handlers\Events; use FireflyConfig; use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\User; -use Illuminate\Auth\Events\Login; use Log; /** diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 8ef77b6326..421425a835 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -101,13 +101,12 @@ class AccountController extends Controller } /** - * @param Request $request * @param AccountRepositoryInterface $repository * @param Account $account * * @return View */ - public function delete(Request $request, AccountRepositoryInterface $repository, Account $account) + public function delete(AccountRepositoryInterface $repository, Account $account) { $typeName = config('firefly.shortNamesByFullName.' . $account->accountType->type); $subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]); diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.php index 38b2723ca1..f8208d659f 100644 --- a/app/Http/Controllers/Admin/UpdateController.php +++ b/app/Http/Controllers/Admin/UpdateController.php @@ -102,14 +102,15 @@ class UpdateController extends Controller /** @var UpdateRequest $request */ $request = app(UpdateRequest::class); $check = -2; + $first = new Release(['id' => '0', 'title' => '0', 'updated' => '2017-01-01', 'content' => '']); + $string = ''; try { $request->call(); $releases = $request->getReleases(); // first entry should be the latest entry: /** @var Release $first */ - $first = reset($releases); - $string = ''; - $check = version_compare($current, $first->getTitle()); + $first = reset($releases); + $check = version_compare($current, $first->getTitle()); FireflyConfig::set('last_update_check', time()); } catch (FireflyException $e) { Log::error(sprintf('Could not check for updates: %s', $e->getMessage())); @@ -120,7 +121,12 @@ class UpdateController extends Controller if ($check === -1) { // there is a new FF version! - $string = strval(trans('firefly.update_new_version_alert', ['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($this->monthAndDayFormat)])); + $string = strval( + trans( + 'firefly.update_new_version_alert', + ['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($this->monthAndDayFormat)] + ) + ); } if ($check === 0) { // you are running the current version! diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 6407760e55..8937027dfd 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -59,12 +59,11 @@ class AttachmentController extends Controller } /** - * @param Request $request * @param Attachment $attachment * * @return View */ - public function delete(Request $request, Attachment $attachment) + public function delete(Attachment $attachment) { $subTitle = trans('firefly.delete_attachment', ['name' => $attachment->filename]); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 46f24a243f..e6a4bfcc9b 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -64,7 +64,7 @@ class LoginController extends Controller * * @param Request $request * - * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response|void + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response * * @throws \Illuminate\Validation\ValidationException */ @@ -102,7 +102,7 @@ class LoginController extends Controller * @param Request $request * @param CookieJar $cookieJar * - * @return $this + * @return $this|\Illuminate\Http\RedirectResponse */ public function logout(Request $request, CookieJar $cookieJar) { diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index e867c87b95..391749489a 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -91,12 +91,11 @@ class BillController extends Controller } /** - * @param Request $request - * @param Bill $bill + * @param Bill $bill * * @return View */ - public function delete(Request $request, Bill $bill) + public function delete(Bill $bill) { // put previous url in session $this->rememberPreviousUri('bills.delete.uri'); @@ -194,7 +193,7 @@ class BillController extends Controller } ); // paginate bills - $bills= new LengthAwarePaginator($collection, $total, $pageSize, $page); + $bills = new LengthAwarePaginator($collection, $total, $pageSize, $page); $bills->setPath(route('bills.index')); return view('bills.index', compact('bills')); diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 50c21f95d3..cf5a41bc6f 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -118,12 +118,11 @@ class BudgetController extends Controller } /** - * @param Request $request - * @param Budget $budget + * @param Budget $budget * * @return View */ - public function delete(Request $request, Budget $budget) + public function delete(Budget $budget) { $subTitle = trans('firefly.delete_budget', ['name' => $budget->name]); diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 61f1c9980f..0e3013f88a 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -80,12 +80,11 @@ class CategoryController extends Controller } /** - * @param Request $request * @param Category $category * * @return View */ - public function delete(Request $request, Category $category) + public function delete(Category $category) { $subTitle = trans('firefly.delete_category', ['name' => $category->name]); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 59ea09c3c7..32c2c63a24 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers; use Artisan; use Carbon\Carbon; use DB; +use Exception; use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\JournalCollectorInterface; @@ -39,7 +40,6 @@ use Illuminate\Support\Collection; use Log; use Monolog\Handler\RotatingFileHandler; use Preferences; -use ReflectionException; use Response; use Route as RouteFacade; use View; @@ -186,7 +186,7 @@ class HomeController extends Controller Log::debug('Call twig:clean...'); try { Artisan::call('twig:clean'); - } catch (ReflectionException $e) { + } catch (Exception $e) { // dont care } Log::debug('Call view:clear...'); diff --git a/app/Http/Controllers/Import/PrerequisitesController.php b/app/Http/Controllers/Import/PrerequisitesController.php index 9d0755fdbc..42a7b3d243 100644 --- a/app/Http/Controllers/Import/PrerequisitesController.php +++ b/app/Http/Controllers/Import/PrerequisitesController.php @@ -60,7 +60,7 @@ class PrerequisitesController extends Controller * * @param string $bank * - * @return \Illuminate\Http\RedirectResponse|null + * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse * * @throws FireflyException */ diff --git a/app/Http/Controllers/Import/StatusController.php b/app/Http/Controllers/Import/StatusController.php index 267ba7f5e4..fd54229a95 100644 --- a/app/Http/Controllers/Import/StatusController.php +++ b/app/Http/Controllers/Import/StatusController.php @@ -108,8 +108,6 @@ class StatusController extends Controller $result['running'] = true; } - // TODO cannot handle 'error' - return Response::json($result); } } diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 3381500649..6e28443d54 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -29,7 +29,6 @@ use FireflyIII\Models\AccountType; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Support\CacheProperties; -use Log; use Response; /** diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index 986a3b103e..ace783ae57 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -46,6 +46,7 @@ class IntroController $specificSteps = $this->getSpecificSteps($route, $specificPage); if (0 === count($specificSteps)) { Log::debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage)); + return Response::json($steps); } if ($this->hasOutroStep($route)) { diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index 0a27cdb2f2..b7d3fc7654 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -238,7 +238,7 @@ class ReportController extends Controller private function parseAttributes(array $attributes): array { $attributes['location'] = $attributes['location'] ?? ''; - $attributes['accounts'] = AccountList::routeBinder($attributes['accounts'] ?? '', new Route('get','',[])); + $attributes['accounts'] = AccountList::routeBinder($attributes['accounts'] ?? '', new Route('get', '', [])); try { $attributes['startDate'] = Carbon::createFromFormat('Ymd', $attributes['startDate']); } catch (InvalidArgumentException $e) { diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index 608cb1e6c4..75e3a70a50 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -26,8 +26,8 @@ use FireflyIII\Http\Requests\TokenFormRequest; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; -use Illuminate\Http\Request; use Google2FA; +use Illuminate\Http\Request; use Preferences; use Session; use View; diff --git a/app/Http/Controllers/Report/ExpenseController.php b/app/Http/Controllers/Report/ExpenseController.php index eea0e638b6..90dc90a2ea 100644 --- a/app/Http/Controllers/Report/ExpenseController.php +++ b/app/Http/Controllers/Report/ExpenseController.php @@ -231,7 +231,7 @@ class ExpenseController extends Controller $cache->addProperty($accounts->pluck('id')->toArray()); $cache->addProperty($expense->pluck('id')->toArray()); if ($cache->has()) { - //return $cache->get(); // @codeCoverageIgnore + return $cache->get(); // @codeCoverageIgnore } $combined = $this->combineAccounts($expense); $all = new Collection; diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index ae111b3827..d93e431df7 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -59,12 +59,10 @@ class SplitController extends Controller /** @var CurrencyRepositoryInterface */ private $currencies; - - /** @var JournalTaskerInterface */ - private $tasker; - /** @var JournalRepositoryInterface */ private $repository; + /** @var JournalTaskerInterface */ + private $tasker; /** * @@ -81,7 +79,7 @@ class SplitController extends Controller $this->tasker = app(JournalTaskerInterface::class); $this->attachments = app(AttachmentHelperInterface::class); $this->currencies = app(CurrencyRepositoryInterface::class); - $this->repository = app(JournalRepositoryInterface::class); + $this->repository = app(JournalRepositoryInterface::class); app('view')->share('mainTitleIcon', 'fa-share-alt'); app('view')->share('title', trans('firefly.split-transactions')); @@ -145,8 +143,8 @@ class SplitController extends Controller } /** - * @param SplitJournalFormRequest $request - * @param TransactionJournal $journal + * @param SplitJournalFormRequest $request + * @param TransactionJournal $journal * * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ diff --git a/app/Import/FileProcessor/CsvProcessor.php b/app/Import/FileProcessor/CsvProcessor.php index 1608c4e7bf..1ad9d6b973 100644 --- a/app/Import/FileProcessor/CsvProcessor.php +++ b/app/Import/FileProcessor/CsvProcessor.php @@ -72,6 +72,7 @@ class CsvProcessor implements FileProcessorInterface * @return bool * * @throws \League\Csv\Exception + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function run(): bool { diff --git a/app/Import/Object/ImportJournal.php b/app/Import/Object/ImportJournal.php index b7f8e3ca89..a903ffe7e1 100644 --- a/app/Import/Object/ImportJournal.php +++ b/app/Import/Object/ImportJournal.php @@ -330,6 +330,7 @@ class ImportJournal */ private function selectAmountInput() { + $info = []; $converterClass = ''; if (!is_null($this->amount)) { Log::debug('Amount value is not NULL, assume this is the correct value.'); diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php index 4b0823fbba..f548ae0068 100644 --- a/app/Import/Storage/ImportStorage.php +++ b/app/Import/Storage/ImportStorage.php @@ -236,7 +236,6 @@ class ImportStorage // match bills if config calls for it. if (true === $this->matchBills) { - //$this->/applyRules($journal); Log::info('Cannot match bills (yet).'); $this->matchBills($journal); } diff --git a/app/Models/Account.php b/app/Models/Account.php index c4e523a886..11a1061320 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -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) diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php index f70953f3be..c98e4780da 100644 --- a/app/Models/AccountMeta.php +++ b/app/Models/AccountMeta.php @@ -69,6 +69,7 @@ class AccountMeta extends Model /** * @param $value + * * @codeCoverageIgnore */ public function setDataAttribute($value) diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php index 957996968e..f78478dde8 100644 --- a/app/Models/Attachment.php +++ b/app/Models/Attachment.php @@ -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) diff --git a/app/Models/Bill.php b/app/Models/Bill.php index 68121c947c..b7dcb125cd 100644 --- a/app/Models/Bill.php +++ b/app/Models/Bill.php @@ -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) diff --git a/app/Models/Budget.php b/app/Models/Budget.php index a47b9e9176..ba013701ea 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -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) diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php index 6d5ebad901..ddab3dfab0 100644 --- a/app/Models/BudgetLimit.php +++ b/app/Models/BudgetLimit.php @@ -77,6 +77,7 @@ class BudgetLimit extends Model /** * @codeCoverageIgnore + * * @param $value */ public function setAmountAttribute($value) diff --git a/app/Models/Category.php b/app/Models/Category.php index c5b3b741ae..38f6e3712d 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -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) diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index bf36775c52..6a2b97c9bf 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -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) diff --git a/app/Models/ExportJob.php b/app/Models/ExportJob.php index 65bcd1820b..1c019919e6 100644 --- a/app/Models/ExportJob.php +++ b/app/Models/ExportJob.php @@ -61,6 +61,7 @@ class ExportJob extends Model /** * @codeCoverageIgnore + * * @param $status */ public function change($status) diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php index c4bf040c6c..51904e9f9d 100644 --- a/app/Models/PiggyBank.php +++ b/app/Models/PiggyBank.php @@ -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) diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php index 683f2b7b9e..4bd7753aa9 100644 --- a/app/Models/PiggyBankEvent.php +++ b/app/Models/PiggyBankEvent.php @@ -62,6 +62,7 @@ class PiggyBankEvent extends Model /** * @codeCoverageIgnore + * * @param $value */ public function setAmountAttribute($value) diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php index 77e09eadbc..af65867865 100644 --- a/app/Models/PiggyBankRepetition.php +++ b/app/Models/PiggyBankRepetition.php @@ -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) diff --git a/app/Models/Preference.php b/app/Models/Preference.php index d85c3323ba..e59f68148d 100644 --- a/app/Models/Preference.php +++ b/app/Models/Preference.php @@ -80,6 +80,7 @@ class Preference extends Model /** * @codeCoverageIgnore + * * @param $value */ public function setDataAttribute($value) diff --git a/app/Models/Tag.php b/app/Models/Tag.php index f7d6351642..5f70bee39e 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -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) diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 0378477c4b..35d388ad99 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -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) diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php index beacb01102..708fc36217 100644 --- a/app/Models/TransactionCurrency.php +++ b/app/Models/TransactionCurrency.php @@ -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; } diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index 4ba5ae9283..74fc1fd07a 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -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) diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php index f8f625d645..36ec286341 100644 --- a/app/Models/TransactionJournalLink.php +++ b/app/Models/TransactionJournalLink.php @@ -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 diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php index 827d3f7301..3e87d48d0b 100644 --- a/app/Models/TransactionJournalMeta.php +++ b/app/Models/TransactionJournalMeta.php @@ -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) diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 849ce97aac..3c404fdf88 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -190,7 +190,7 @@ class AccountRepository implements AccountRepositoryInterface // update the account: $account->name = $data['name']; $account->active = $data['active']; - $account->virtual_balance = trim($data['virtualBalance']) === '' ? '0': $data['virtualBalance']; + $account->virtual_balance = trim($data['virtualBalance']) === '' ? '0' : $data['virtualBalance']; $account->iban = $data['iban']; $account->save(); diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index a136ed1784..782b38cca3 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -26,7 +26,6 @@ use FireflyIII\Models\Account; use FireflyIII\Models\Note; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; -use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Support\Collection; @@ -54,13 +53,6 @@ interface JournalRepositoryInterface */ public function countTransactions(TransactionJournal $journal): int; - /** - * @param TransactionJournal $journal - * - * @return Note|null - */ - public function getNote(TransactionJournal $journal): ?Note; - /** * Deletes a journal. * @@ -107,6 +99,13 @@ interface JournalRepositoryInterface */ public function getAssetTransaction(TransactionJournal $journal): ?Transaction; + /** + * @param TransactionJournal $journal + * + * @return Note|null + */ + public function getNote(TransactionJournal $journal): ?Note; + /** * @return Collection */ diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php index a94ed251b2..19ae1c8846 100644 --- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php +++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php @@ -95,7 +95,7 @@ interface LinkTypeRepositoryInterface /** * Store link between two journals. * - * @param array $information + * @param array $information * @param TransactionJournal $left * @param TransactionJournal $right * diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php index 1588696677..f3a76efcd4 100644 --- a/app/Repositories/User/UserRepositoryInterface.php +++ b/app/Repositories/User/UserRepositoryInterface.php @@ -37,20 +37,6 @@ interface UserRepositoryInterface */ public function all(): Collection; - /** - * Returns the first user in the DB. Generally only works when there is just one. - * - * @return null|User - */ - public function first(): ?User; - - /** - * @param array $data - * - * @return User - */ - public function store(array $data): User; - /** * Gives a user a role. * @@ -119,6 +105,13 @@ interface UserRepositoryInterface */ public function findByEmail(string $email): ?User; + /** + * Returns the first user in the DB. Generally only works when there is just one. + * + * @return null|User + */ + public function first(): ?User; + /** * Return basic user information. * @@ -136,6 +129,13 @@ interface UserRepositoryInterface */ public function hasRole(User $user, string $role): bool; + /** + * @param array $data + * + * @return User + */ + public function store(array $data): User; + /** * @param User $user */ diff --git a/app/Services/Spectre/Request/SpectreRequest.php b/app/Services/Spectre/Request/SpectreRequest.php index 8d87297829..8db025b6ba 100644 --- a/app/Services/Spectre/Request/SpectreRequest.php +++ b/app/Services/Spectre/Request/SpectreRequest.php @@ -40,8 +40,6 @@ abstract class SpectreRequest * @var int */ protected $expiresAt = 0; - /** @var ServerPublicKey */ - protected $serverPublicKey; /** @var string */ protected $serviceSecret = ''; /** @var string */ @@ -104,22 +102,6 @@ abstract class SpectreRequest return $this->server; } - /** - * @return ServerPublicKey - */ - public function getServerPublicKey(): ServerPublicKey - { - return $this->serverPublicKey; - } - - /** - * @param ServerPublicKey $serverPublicKey - */ - public function setServerPublicKey(ServerPublicKey $serverPublicKey) - { - $this->serverPublicKey = $serverPublicKey; - } - /** * @return string */ @@ -144,14 +126,6 @@ abstract class SpectreRequest $this->privateKey = $privateKey; } - /** - * @param string $secret - */ - public function setSecret(string $secret) - { - $this->secret = $secret; - } - /** * @param string $method * @param string $uri @@ -169,8 +143,6 @@ abstract class SpectreRequest if ('get' === strtolower($method) || 'delete' === strtolower($method)) { $data = ''; } - // base64(sha1_signature(private_key, "Expires-at|request_method|original_url|post_body|md5_of_uploaded_file|"))) - // Prepare the signature $toSign = $this->expiresAt . '|' . strtoupper($method) . '|' . $uri . '|' . $data . ''; // no file so no content there. Log::debug(sprintf('String to sign: "%s"', $toSign)); $signature = ''; diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 8d79402963..a9d066e557 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -202,7 +202,7 @@ class Amount /** * @return \FireflyIII\Models\TransactionCurrency * - * @throws FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function getDefaultCurrency(): TransactionCurrency { @@ -216,7 +216,7 @@ class Amount * * @return \FireflyIII\Models\TransactionCurrency * - * @throws FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function getDefaultCurrencyByUser(User $user): TransactionCurrency { diff --git a/app/Support/Binder/Date.php b/app/Support/Binder/Date.php index 7622b5d8b0..5b04cfbd54 100644 --- a/app/Support/Binder/Date.php +++ b/app/Support/Binder/Date.php @@ -24,7 +24,6 @@ namespace FireflyIII\Support\Binder; use Carbon\Carbon; use Exception; -use FireflyIII\Helpers\FiscalHelper; use FireflyIII\Helpers\FiscalHelperInterface; use Illuminate\Routing\Route; use Log; diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index 02e3775377..04ce257ebb 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -25,6 +25,7 @@ namespace FireflyIII\Support; use Amount as Amt; use Carbon\Carbon; use Eloquent; +use FireflyIII\Exceptions\FireflyException; use Illuminate\Support\Collection; use Illuminate\Support\MessageBag; use RuntimeException; @@ -36,11 +37,12 @@ use Session; class ExpandedForm { /** - * @param $name - * @param null $value - * @param array $options + * @param string $name + * @param null $value + * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException */ public function amount(string $name, $value = null, array $options = []): string { @@ -53,6 +55,7 @@ class ExpandedForm * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException */ public function amountSmall(string $name, $value = null, array $options = []): string { @@ -65,6 +68,8 @@ class ExpandedForm * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException + * */ public function balance(string $name, $value = null, array $options = []): string { @@ -594,8 +599,7 @@ class ExpandedForm * * @return string * - * @throws \Throwable - * @throws Facades\FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ private function currencyField(string $name, string $view, $value = null, array $options = []): string { diff --git a/app/Support/Import/Information/BunqInformation.php b/app/Support/Import/Information/BunqInformation.php index 851cafb2af..ab12faf500 100644 --- a/app/Support/Import/Information/BunqInformation.php +++ b/app/Support/Import/Information/BunqInformation.php @@ -63,6 +63,7 @@ class BunqInformation implements InformationInterface * @return array * * @throws FireflyException + * @throws \Exception */ public function getAccounts(): array { diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index ebc33e78bc..59de0f956d 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -473,6 +473,7 @@ class Navigation $date->subMonths($subtract); Log::debug(sprintf('%s is in modifier map with value %d, execute subMonths with argument %d', $repeatFreq, $modifierMap[$repeatFreq], $subtract)); Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d'))); + return $date; } // a custom range requires the session start diff --git a/app/TransactionRules/Triggers/AbstractTrigger.php b/app/TransactionRules/Triggers/AbstractTrigger.php index 201bcbad57..0177db9860 100644 --- a/app/TransactionRules/Triggers/AbstractTrigger.php +++ b/app/TransactionRules/Triggers/AbstractTrigger.php @@ -29,6 +29,7 @@ use FireflyIII\Models\TransactionJournal; * This class will be magical! * * Class AbstractTrigger + * @method triggered */ class AbstractTrigger { @@ -43,15 +44,6 @@ class AbstractTrigger /** @var string Trigger value */ protected $triggerValue; - /** - * AbstractTrigger constructor. - * - * @codeCoverageIgnore - */ - private function __construct() - { - } - /** * Make a new trigger from the value given in the string. * diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index a7f73f4b9e..b50b3b4659 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -340,7 +340,7 @@ class FireflyValidator extends Validator * * @return bool */ - public function validateUniqueAccountNumberForUser($attribute, $value, $parameters): bool + public function validateUniqueAccountNumberForUser($attribute, $value): bool { $accountId = $this->data['id'] ?? 0; diff --git a/public/js/ff/accounts/reconcile.js b/public/js/ff/accounts/reconcile.js index 98ddc523e0..4f1b46666d 100644 --- a/public/js/ff/accounts/reconcile.js +++ b/public/js/ff/accounts/reconcile.js @@ -92,7 +92,6 @@ function storeReconcile() { transactions: ids, cleared: cleared, }; - console.log var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); diff --git a/public/js/ff/accounts/show.js b/public/js/ff/accounts/show.js index 3b1ca6ce87..ba77ebff95 100644 --- a/public/js/ff/accounts/show.js +++ b/public/js/ff/accounts/show.js @@ -18,7 +18,7 @@ * along with Firefly III. If not, see . */ -/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri */ +/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri, token */ var fixHelper = function (e, tr) { "use strict"; diff --git a/public/js/ff/admin/update/index.js b/public/js/ff/admin/update/index.js index 39a427e77e..d02d0ad23f 100644 --- a/public/js/ff/admin/update/index.js +++ b/public/js/ff/admin/update/index.js @@ -18,6 +18,8 @@ * along with Firefly III. If not, see . */ +/** global: updateCheckUri */ + $(function () { "use strict"; @@ -31,7 +33,7 @@ function checkUpdate() { // do post update check: $.post(updateCheckUri).done(function (data) { alert(data.result); - }).fail(function() { + }).fail(function () { alert('Error while checking.'); }); diff --git a/public/js/ff/budgets/index.js b/public/js/ff/budgets/index.js index db07e9088d..6a36dae5a0 100644 --- a/public/js/ff/budgets/index.js +++ b/public/js/ff/budgets/index.js @@ -18,7 +18,7 @@ * along with Firefly III. If not, see . */ -/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */ +/** global: infoIncomeUri, token, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */ /** * */ @@ -104,7 +104,7 @@ function updateBudgetedAmounts(e) { var target = $(e.target); var id = target.data('id'); var leftCell = $('td[class$="left"][data-id="' + id + '"]'); - var link = $('a[data-id="'+id+'"][class="budget-link"]'); + var link = $('a[data-id="' + id + '"][class="budget-link"]'); var value = target.val(); var original = target.data('original'); @@ -112,7 +112,7 @@ function updateBudgetedAmounts(e) { target.prop('disabled', true); // replace link (for now) - link.attr('href','#'); + link.attr('href', '#'); // replace "left" with spinner. leftCell.empty().html(''); diff --git a/public/js/ff/charts.defaults.js b/public/js/ff/charts.defaults.js index 21c5852877..e2764d5567 100644 --- a/public/js/ff/charts.defaults.js +++ b/public/js/ff/charts.defaults.js @@ -29,40 +29,37 @@ * @param maxwidth * @returns {Array} */ -function formatLabel(str, maxwidth){ +function formatLabel(str, maxwidth) { var sections = []; var words = str.split(" "); var temp = ""; - words.forEach(function(item, index){ - if(temp.length > 0) - { + words.forEach(function (item, index) { + if (temp.length > 0) { var concat = temp + ' ' + item; - if(concat.length > maxwidth){ + if (concat.length > maxwidth) { sections.push(temp); temp = ""; } - else{ - if(index === (words.length-1)) - { + else { + if (index === (words.length - 1)) { sections.push(concat); return; } - else{ + else { temp = concat; return; } } } - if(index === (words.length-1)) - { + if (index === (words.length - 1)) { sections.push(item); return; } - if(item.length < maxwidth) { + if (item.length < maxwidth) { temp = item; } else { diff --git a/public/js/ff/help.js b/public/js/ff/help.js index 9894563e66..9e7280b1c0 100644 --- a/public/js/ff/help.js +++ b/public/js/ff/help.js @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ - +/** global: token */ $(function () { "use strict"; $('#help').click(showHelp); diff --git a/public/js/ff/import/status.js b/public/js/ff/import/status.js index 9fa0198516..c05560cafd 100644 --- a/public/js/ff/import/status.js +++ b/public/js/ff/import/status.js @@ -18,7 +18,7 @@ * along with Firefly III. If not, see . */ -/** global: langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */ +/** global: job, langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */ var timeOutId; var startInterval = 1000; diff --git a/public/js/ff/piggy-banks/index.js b/public/js/ff/piggy-banks/index.js index 72f128a2a0..292d7f7f7d 100644 --- a/public/js/ff/piggy-banks/index.js +++ b/public/js/ff/piggy-banks/index.js @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ - +/** global: token */ var fixHelper = function (e, tr) { "use strict"; var $originals = tr.children(); diff --git a/public/js/ff/reports/account/month.js b/public/js/ff/reports/account/month.js index a8d2129875..6aba68d1b0 100644 --- a/public/js/ff/reports/account/month.js +++ b/public/js/ff/reports/account/month.js @@ -1,4 +1,3 @@ - /* * month.js * Copyright (c) 2017 thegrumpydictator@gmail.com @@ -18,10 +17,10 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ - +/** global: spentUri, categoryUri, budgetUri, expenseUri, incomeUri, mainUri */ $(function () { "use strict"; - drawChart(); + doubleYChart(mainUri, 'in-out-chart'); loadAjaxPartial('inOutAccounts', spentUri); loadAjaxPartial('inOutCategory', categoryUri); @@ -31,9 +30,3 @@ $(function () { }); -function drawChart() { - "use strict"; - - // month view: - doubleYChart(mainUri, 'in-out-chart'); -} \ No newline at end of file diff --git a/public/js/ff/reports/all.js b/public/js/ff/reports/all.js index 3c34cb9a35..912539796c 100644 --- a/public/js/ff/reports/all.js +++ b/public/js/ff/reports/all.js @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ - +/** global: startDate, endDate, accountIds */ function loadAjaxPartial(holder, uri) { "use strict"; $.get(uri).done(function (data) { diff --git a/public/js/ff/reports/index.js b/public/js/ff/reports/index.js index dfea1c9fc0..9e9562e947 100644 --- a/public/js/ff/reports/index.js +++ b/public/js/ff/reports/index.js @@ -139,7 +139,6 @@ function setOptionalFromCookies() { $('#inputExpRevAccounts').multiselect(defaultMultiSelect); - } function catchSubmit() { @@ -161,7 +160,7 @@ function catchSubmit() { createCookie('report-categories', categories, 365); createCookie('report-budgets', budgets, 365); createCookie('report-tags', tags, 365); - createCookie('report-exp-rev', expRev , 365); + createCookie('report-exp-rev', expRev, 365); createCookie('report-start', moment(picker.startDate).format("YYYYMMDD"), 365); createCookie('report-end', moment(picker.endDate).format("YYYYMMDD"), 365); diff --git a/public/js/ff/rules/index.js b/public/js/ff/rules/index.js index 5c58468fa1..27ef2fb053 100644 --- a/public/js/ff/rules/index.js +++ b/public/js/ff/rules/index.js @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with Firefly III. If not, see . */ - +/** global: token */ var fixHelper = function (e, tr) { "use strict"; var $originals = tr.children(); diff --git a/public/js/ff/search/index.js b/public/js/ff/search/index.js index 8b8cea4304..70615ae476 100644 --- a/public/js/ff/search/index.js +++ b/public/js/ff/search/index.js @@ -18,7 +18,7 @@ * along with Firefly III. If not, see . */ -/** global: searchQuery,searchUri */ +/** global: searchQuery,searchUri,token */ diff --git a/public/js/ff/tags/show.js b/public/js/ff/tags/show.js index e2b5f75922..b199393bbe 100644 --- a/public/js/ff/tags/show.js +++ b/public/js/ff/tags/show.js @@ -48,7 +48,7 @@ $(function () { }).addTo(mymap); if (doPlaceMarker) { - var marker = L.marker([latitude, longitude]).addTo(mymap); + L.marker([latitude, longitude]).addTo(mymap); } } }); diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index 1a9b5d1230..70694d0598 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -18,7 +18,7 @@ * along with Firefly III. If not, see . */ -/** global: edit_selected_txt, delete_selected_txt */ +/** global: edit_selected_txt, delete_selected_txt, token */ /** * diff --git a/resources/stubs/demo-configuration.json b/resources/stubs/demo-configuration.json index c69c8bfe71..ed3e7a60b1 100644 --- a/resources/stubs/demo-configuration.json +++ b/resources/stubs/demo-configuration.json @@ -1,37 +1,37 @@ { - "has-headers": true, - "date-format": "Y-m-d", - "delimiter": ",", - "import-account": 1, - "specifics": [], - "column-count": 7, - "column-roles": [ - "account-iban", - "opposing-name", - "amount", - "date-transaction", - "description", - "category-name", - "budget-name" - ], - "column-do-mapping": [ - true, - true, - false, - false, - false, - false, - false - ], - "column-roles-complete": false, - "column-mapping-config": { - "0": { - "NL11XOLA6707795988": 1, - "NL81RCQZ7160379858": 3 - }, - "1": [], - "5": [], - "6": [] + "has-headers": true, + "date-format": "Y-m-d", + "delimiter": ",", + "import-account": 1, + "specifics": [], + "column-count": 7, + "column-roles": [ + "account-iban", + "opposing-name", + "amount", + "date-transaction", + "description", + "category-name", + "budget-name" + ], + "column-do-mapping": [ + true, + true, + false, + false, + false, + false, + false + ], + "column-roles-complete": false, + "column-mapping-config": { + "0": { + "NL11XOLA6707795988": 1, + "NL81RCQZ7160379858": 3 }, - "column-mapping-complete": false + "1": [], + "5": [], + "6": [] + }, + "column-mapping-complete": false } \ No newline at end of file diff --git a/resources/views/accounts/reconcile/overview.twig b/resources/views/accounts/reconcile/overview.twig index abc2fe9af3..78502d20af 100644 --- a/resources/views/accounts/reconcile/overview.twig +++ b/resources/views/accounts/reconcile/overview.twig @@ -15,7 +15,7 @@ {% for id in transactionIds %} - + {% endfor %} @@ -33,14 +33,14 @@ - + @@ -60,36 +60,36 @@ {% endif %} {% if diffCompare != 0 %} -
-
-
-
-
-
-
- +
+
+
+ +
-
-

- {{ 'reconcile_go_back'|_ }} -

+

+ {{ 'reconcile_go_back'|_ }} +

{% endif %}
diff --git a/resources/views/admin/link/show.twig b/resources/views/admin/link/show.twig index 3a1dab5af5..3d452df573 100644 --- a/resources/views/admin/link/show.twig +++ b/resources/views/admin/link/show.twig @@ -28,7 +28,8 @@
{{ 'submitted_end_balance'|_ }} (date){{ formatAmountByAccount(account, endBalance)}}{{ formatAmountByAccount(account, endBalance) }}
{{ 'difference'|_ }} {{ formatAmountByAccount(account, difference) }} - +
{% if linkType.editable %}
- - + +
{% endif %}
- +
diff --git a/resources/views/admin/users/delete.twig b/resources/views/admin/users/delete.twig index 80c194816d..64ad1ec1ae 100644 --- a/resources/views/admin/users/delete.twig +++ b/resources/views/admin/users/delete.twig @@ -25,7 +25,8 @@

diff --git a/resources/views/bills/index.twig b/resources/views/bills/index.twig index b262cd604a..5635099605 100644 --- a/resources/views/bills/index.twig +++ b/resources/views/bills/index.twig @@ -8,29 +8,29 @@ {% if bills.count == 0 %} {% include 'partials.empty' with {what: 'default', type: 'bills',route: route('bills.create')} %} {% else %} -
-
-
-
-

{{ title }}

+
+
+
+
+

{{ title }}

-
- -
-
-
- {% include 'list/bills' %} +
+
+ {% include 'list/bills' %} +
- {% endif %} +
+
+{% endif %} {% endblock %} {% block styles %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 4a2542f91b..afde0b88fe 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -86,12 +86,12 @@
{% if bill.notes.count == 1 %} - +
-
{{ trans('list.notes') }} {{ bill.notes.first.text|markdown }}
+
{% endif %} diff --git a/resources/views/budgets/income.twig b/resources/views/budgets/income.twig index 50c80832f3..201e2f2a3c 100644 --- a/resources/views/budgets/income.twig +++ b/resources/views/budgets/income.twig @@ -5,7 +5,7 @@ diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index f0b12e1493..b340a9ef02 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -17,10 +17,10 @@ {{ 'budgeted'|_ }}: {{ budgeted|formatAmountPlain }}
- {{ trans('firefly.available_between',{start : periodStart, end: periodEnd }) }}: - {{ available|formatAmountPlain }} - - + {{ trans('firefly.available_between',{start : periodStart, end: periodEnd }) }}: + {{ available|formatAmountPlain }} + +
diff --git a/resources/views/budgets/info.twig b/resources/views/budgets/info.twig index 25a8104b47..6bc6ff6582 100644 --- a/resources/views/budgets/info.twig +++ b/resources/views/budgets/info.twig @@ -5,50 +5,50 @@ - - + + diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index f2a1c9e945..4a697a3c6e 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -122,27 +122,29 @@ {{ limit.spent|formatAmount }} {% if limit.spent > 0 %} - - - {% set overspent = limit.amount + limit.spent < 0 %} + + + {% set overspent = limit.amount + limit.spent < 0 %} - {% if overspent %} - {% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} -
-
-
-
- {% else %} - {% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} -
-
-
- {% endif %} - - + {% if overspent %} + {% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} +
+
+
+
+ {% else %} + {% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} +
+
+
+ {% endif %} + + {% endif %} diff --git a/resources/views/categories/index.twig b/resources/views/categories/index.twig index 8f73c9b307..743d72eede 100644 --- a/resources/views/categories/index.twig +++ b/resources/views/categories/index.twig @@ -6,30 +6,30 @@ {% block content %} {% if categories.count > 0 %} -
-
-
-
-

{{ 'categories'|_ }}

+
+
+
+
+

{{ 'categories'|_ }}

- - -
-
- {% include 'list/categories' %} + + +
+
+ {% include 'list/categories' %}
- {% else %} +
+
+{% else %} {% include 'partials.empty' with {what: 'default', type: 'categories',route: route('categories.create')} %} {% endif %} {% endblock %} diff --git a/resources/views/form/location.twig b/resources/views/form/location.twig index c8201e641f..939bef8ff3 100644 --- a/resources/views/form/location.twig +++ b/resources/views/form/location.twig @@ -2,118 +2,120 @@
{% if env('MAPBOX_API_KEY','') == '' %} -

- {{ trans('firefly.mapbox_api_key')|raw }} -

+

+ {{ trans('firefly.mapbox_api_key')|raw }} +

{% else %}
-
+

{{ 'press_tag_location'|_ }} {{ 'clear_location'|_ }}

- {# latitude #} - {% if old(name~'_latitude') %} - - {% else %} - - {% endif %} + {# latitude #} + {% if old(name~'_latitude') %} + + {% else %} + + {% endif %} - {# longitude #} - {% if old('tag_position_longitude') %} - - {% else %} - - {% endif %} + {# longitude #} + {% if old('tag_position_longitude') %} + + {% else %} + + {% endif %} - {# zoomlevel #} - {% if old('tag_position_zoomlevel') %} - - {% else %} - - {% endif %} - {% if tag.zoomLevel and tag.longitude and tag.latitude %} - - {% else %} - - {% endif %} + {# zoomlevel #} + {% if old('tag_position_zoomlevel') %} + + {% else %} + + {% endif %} + {% if tag.zoomLevel and tag.longitude and tag.latitude %} + + {% else %} + + {% endif %} {% include 'form/feedback' %} {% endif %}
{% if env('MAPBOX_API_KEY','') != '' %} -{% set latitudevar = name~'_latitude' %} -{% set longitudevar = name~'_longitude' %} -{% set zoomlevelvar = name~'_zoomlevel' %} -{% set hastagvar = name~'_has_tag' %} -{% set settagvar = name~'_set_tag' %} -{% set clearvar = name~'_clear_location' %} + {% set latitudevar = name~'_latitude' %} + {% set longitudevar = name~'_longitude' %} + {% set zoomlevelvar = name~'_zoomlevel' %} + {% set hastagvar = name~'_has_tag' %} + {% set settagvar = name~'_set_tag' %} + {% set clearvar = name~'_clear_location' %} - + if (typeof mapboxToken === 'undefined') { + var mapboxToken = 'invalid'; + } + // + document.getElementById('{{ clearvar }}').addEventListener('click', function () { + if (typeof marker !== 'undefined') { + marker.remove(); + $('input[name="{{ hastagvar }}"]').val('false'); + } + return false; + }); + + // set location thing: + function setTagLocation(e) { + $('input[name="{{ latitudevar }}"]').val(e.latlng.lat); + $('input[name="{{ longitudevar }}"]').val(e.latlng.lng); + $('input[name="{{ zoomlevelvar }}"]').val(mymap.getZoom()); + $('input[name="{{ hastagvar }}"]').val('true'); + + // remove existing marker: + if (typeof marker !== 'undefined') { + marker.remove(); + } + // new marker + marker = L.marker([e.latlng.lat, e.latlng.lng]).addTo(mymap); + } + + + console.log({{ longitudevar }}); + + document.addEventListener("DOMContentLoaded", function () { + "use strict"; + + // make map: + mymap = L.map('{{ name }}_map').setView([{{ latitudevar }}, {{ longitudevar }}], {{ zoomlevelvar }}); + + L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', + maxZoom: 18, + id: 'mapbox.streets', + accessToken: mapboxToken + }).addTo(mymap); + + mymap.on('contextmenu', setTagLocation); + + // add marker + if (typeof {{ settagvar }} !== 'undefined' && {{ settagvar }} === true) { + marker = L.marker([{{ latitudevar }}, {{ longitudevar }}]).addTo(mymap); + } + + }); + {% endif %} diff --git a/resources/views/form/number.twig b/resources/views/form/number.twig index efffb5b8a0..6951b19328 100644 --- a/resources/views/form/number.twig +++ b/resources/views/form/number.twig @@ -2,7 +2,7 @@
- {{ Form.input('number', name, value, options) }} + {{ Form.input('number', name, value, options) }} {% include 'form/feedback' %}
diff --git a/resources/views/import/bank/form.twig b/resources/views/import/bank/form.twig index 70f99a6790..a7c6507a01 100644 --- a/resources/views/import/bank/form.twig +++ b/resources/views/import/bank/form.twig @@ -34,13 +34,13 @@ {% for remoteAccount in remoteAccounts %} - + {{ remoteAccount.name }} -
{{ remoteAccount.number }} +
{{ remoteAccount.number }} {{ remoteAccount.currency }} diff --git a/resources/views/import/file/initial.twig b/resources/views/import/file/initial.twig index fa2e6121ec..cff85df421 100644 --- a/resources/views/import/file/initial.twig +++ b/resources/views/import/file/initial.twig @@ -79,7 +79,7 @@
diff --git a/resources/views/import/file/map.twig b/resources/views/import/file/map.twig index a2ad9d0010..3a347f8905 100644 --- a/resources/views/import/file/map.twig +++ b/resources/views/import/file/map.twig @@ -48,8 +48,8 @@ {{ Form.select('mapping['~field.index~']['~option~']', - field.options, - job.configuration['column-mapping-config'][field.index][option], {class: 'form-control'}) }} + field.options, + job.configuration['column-mapping-config'][field.index][option], {class: 'form-control'}) }} {% endfor %} diff --git a/resources/views/import/status.twig b/resources/views/import/status.twig index 650c224fac..ac042e5dd6 100644 --- a/resources/views/import/status.twig +++ b/resources/views/import/status.twig @@ -63,22 +63,22 @@

{% if job.configuration['has-config-file'] != false %} - + {% endif %}
{% if job.configuration['has-config-file'] != false %} -

-   -

-

- {{ trans('import.status_ready_share')|raw }} -

+

+   +

+

+ {{ trans('import.status_ready_share')|raw }} +

{% endif %}
diff --git a/resources/views/index.twig b/resources/views/index.twig index bab812d8b9..c763197739 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -112,7 +112,8 @@ {# EXPENSE ACCOUNTS #}
@@ -123,7 +124,8 @@ {% if showDeps %}
@@ -146,9 +148,9 @@ {% if start.lte(today) and end.gte(today) %} - var today = {{ today.diffInDays(start) + 1 }}; + var today = {{ today.diffInDays(start) + 1 }}; {% else %} - var today = -1; + var today = -1; {% endif %} diff --git a/resources/views/javascript/variables.twig b/resources/views/javascript/variables.twig index 0da9d3eadf..1bd44157cc 100644 --- a/resources/views/javascript/variables.twig +++ b/resources/views/javascript/variables.twig @@ -1,4 +1,3 @@ - // date ranges var ranges = {} {% for title, range in dateRangeConfig.ranges %} @@ -7,22 +6,22 @@ var ranges = {} // date range meta configuration var dateRangeMeta = { - title: "{{ dateRangeTitle }}", - uri: "{{ route('daterange') }}", - labels: { - apply: "{{ 'apply'|_ }}", - cancel: "{{ 'cancel'|_ }}", - from: "{{ 'from'|_ }}", - to: "{{ 'to'|_ }}", - customRange: "{{ 'customRange'|_ }}" - } +title: "{{ dateRangeTitle }}", +uri: "{{ route('daterange') }}", +labels: { +apply: "{{ 'apply'|_ }}", +cancel: "{{ 'cancel'|_ }}", +from: "{{ 'from'|_ }}", +to: "{{ 'to'|_ }}", +customRange: "{{ 'customRange'|_ }}" +} }; // date range actual configuration: var dateRangeConfig = { - startDate: moment("{{ dateRangeConfig.start }}"), - endDate: moment("{{ dateRangeConfig.end }}"), - ranges: ranges +startDate: moment("{{ dateRangeConfig.start }}"), +endDate: moment("{{ dateRangeConfig.end }}"), +ranges: ranges }; diff --git a/resources/views/json/piggy-banks.twig b/resources/views/json/piggy-banks.twig index d8cc226c5e..478ba1d95b 100644 --- a/resources/views/json/piggy-banks.twig +++ b/resources/views/json/piggy-banks.twig @@ -5,9 +5,10 @@
{% for entry in info %} - {{ entry.name }}
+ {{ entry.name }}
-
+
{% if entry.percentage >=20 %}{{ entry.amount|formatAmountPlain }}{% endif %}
{% if entry.percentage < 20 %} {{ entry.amount|formatAmountPlain }}{% endif %} diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index d01ab308c0..f39e95761a 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -185,7 +185,8 @@ - + {% if not shownDemo %} diff --git a/resources/views/list/accounts.twig b/resources/views/list/accounts.twig index 90a031efbb..90c69be280 100644 --- a/resources/views/list/accounts.twig +++ b/resources/views/list/accounts.twig @@ -21,7 +21,14 @@ {% for account in accounts %} -
{% if what == 'asset' %}{% endif %}
+
{% if what == 'asset' %}{% endif %}
{{ account.name }} {% if what == "asset" %} diff --git a/resources/views/list/bills.twig b/resources/views/list/bills.twig index e7bb11c980..e4e8f6afc8 100644 --- a/resources/views/list/bills.twig +++ b/resources/views/list/bills.twig @@ -19,7 +19,9 @@ {% for entry in bills %} -
+
{{ entry.name }} diff --git a/resources/views/list/journals.twig b/resources/views/list/journals.twig index 0e3f4ff036..e0e25e9383 100644 --- a/resources/views/list/journals.twig +++ b/resources/views/list/journals.twig @@ -46,12 +46,14 @@
{{ 'select_transactions'|_ }} + > {{ 'stop_selection'|_ }} {% if showReconcile == true %} {% if moment == 'all' %} - {{ 'reconcile_this_account'|_ }} + {{ 'reconcile_this_account'|_ }} {% else %} - {{ 'reconcile_this_account'|_ }} + {{ 'reconcile_this_account'|_ }} {% endif %} {% endif %}
diff --git a/resources/views/list/piggy-bank-events.twig b/resources/views/list/piggy-bank-events.twig index 89b20f1710..43c815b54a 100644 --- a/resources/views/list/piggy-bank-events.twig +++ b/resources/views/list/piggy-bank-events.twig @@ -1,7 +1,7 @@ {% if showPiggyBank %} - + {% endif %} diff --git a/resources/views/partials/menu-sidebar.twig b/resources/views/partials/menu-sidebar.twig index b73ae95836..205a887c99 100644 --- a/resources/views/partials/menu-sidebar.twig +++ b/resources/views/partials/menu-sidebar.twig @@ -159,7 +159,8 @@ class="fa fa-gear fa-fw"> {{ 'preferences'|_ }}
  • - {{ 'currencies'|_ }} + {{ 'currencies'|_ }} +
  • {% if Auth.user.hasRole('owner') %} diff --git a/resources/views/partials/transaction-row.twig b/resources/views/partials/transaction-row.twig index e969a07888..2b54a0bad0 100644 --- a/resources/views/partials/transaction-row.twig +++ b/resources/views/partials/transaction-row.twig @@ -1,11 +1,11 @@ - {# input buttons #} diff --git a/resources/views/reports/partials/exp-budgets.twig b/resources/views/reports/partials/exp-budgets.twig index 992570d1dc..d1cc577e1d 100644 --- a/resources/views/reports/partials/exp-budgets.twig +++ b/resources/views/reports/partials/exp-budgets.twig @@ -1,7 +1,7 @@
    {{ trans('list.piggy_bank') }}{{ trans('list.piggy_bank') }}{{ trans('list.date') }} {{ trans('list.amount') }}
    {{ line.getBill.name }} -
    +
    {{ trans('firefly.bill_expected_between', {start: line.getPayDate.formatLocalized(monthAndDayFormat), end: line.getEndOfPayDate.formatLocalized(monthAndDayFormat) }) }}
    - + @@ -20,7 +20,7 @@ {{ '0'|formatAmount }} {% else %} {% for expense in entry.spent.per_currency %} - {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    {% endfor %} {% endif %} diff --git a/resources/views/reports/partials/exp-categories.twig b/resources/views/reports/partials/exp-categories.twig index e700cf4268..1ff99b927d 100644 --- a/resources/views/reports/partials/exp-categories.twig +++ b/resources/views/reports/partials/exp-categories.twig @@ -1,7 +1,7 @@
    {{ 'category'|_ }}{{ 'category'|_ }} {{ 'spent'|_ }}
    - + @@ -22,7 +22,7 @@ {{ '0'|formatAmount }} {% else %} {% for expense in entry.spent.per_currency %} - {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    {% endfor %} {% endif %} @@ -31,7 +31,7 @@ {{ '0'|formatAmount }} {% else %} {% for income in entry.earned.per_currency %} - {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
    + {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
    {% endfor %} {% endif %} diff --git a/resources/views/reports/partials/exp-not-grouped.twig b/resources/views/reports/partials/exp-not-grouped.twig index 85a5a667c8..ab4250937c 100644 --- a/resources/views/reports/partials/exp-not-grouped.twig +++ b/resources/views/reports/partials/exp-not-grouped.twig @@ -1,4 +1,3 @@ -
    {{ 'category'|_ }}{{ 'category'|_ }} {{ 'spent'|_ }} {{ 'earned'|_ }}
    @@ -12,19 +11,19 @@ diff --git a/resources/views/reports/partials/top-transactions.twig b/resources/views/reports/partials/top-transactions.twig index e068286fd1..67e9c080a2 100644 --- a/resources/views/reports/partials/top-transactions.twig +++ b/resources/views/reports/partials/top-transactions.twig @@ -17,7 +17,8 @@ - + {% endfor %} diff --git a/resources/views/rules/index.twig b/resources/views/rules/index.twig index 3a8f16d1ce..58a749477f 100644 --- a/resources/views/rules/index.twig +++ b/resources/views/rules/index.twig @@ -107,7 +107,9 @@
    {{ name }} - {% if amounts.spent.per_currency|length == 0%} + {% if amounts.spent.per_currency|length == 0 %} {{ '0'|formatAmount }} {% endif %} {% for expense in amounts.spent.per_currency %} - {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
    {% endfor %}
    - {% if amounts.earned.per_currency|length == 0%} + {% if amounts.earned.per_currency|length == 0 %} {{ '0'|formatAmount }} {% endif %} {% for income in amounts.earned.per_currency %} - {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
    + {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
    {% endfor %}
    {{ transaction.date.formatLocalized(monthAndDayFormat) }} {{ transaction|transactionAmount }}{{ transaction|transactionAmount }}
    {# show which transactions would match #} - + {# actually execute rule #} {% endblock %} {% block styles %} - + {% endblock %} diff --git a/resources/views/tags/edit.twig b/resources/views/tags/edit.twig index 5eed6ff416..41d032f2d6 100644 --- a/resources/views/tags/edit.twig +++ b/resources/views/tags/edit.twig @@ -95,7 +95,7 @@ {% endblock %} {% block styles %} - + {% endblock %} diff --git a/resources/views/tags/index.twig b/resources/views/tags/index.twig index 08d8c4156e..e611b43801 100644 --- a/resources/views/tags/index.twig +++ b/resources/views/tags/index.twig @@ -10,25 +10,26 @@ {% else %} {% for period,entries in clouds %} {% if entries|length > 0 %} -
    -
    -
    -
    -

    - {% if period == 'no-date' %}{{ 'without_date'|_ }}{% else %}{{ period }}{% endif %} -

    -
    -
    -

    - {% for tagInfo in entries %} - {{ tagInfo.tag.tag }} - {% endfor %} -

    +
    +
    +
    +
    +

    + {% if period == 'no-date' %}{{ 'without_date'|_ }}{% else %}{{ period }}{% endif %} +

    +
    +
    +

    + {% for tagInfo in entries %} + {{ tagInfo.tag.tag }} + {% endfor %} +

    +
    -
    - {% endif %} + {% endif %} {% endfor %} {# diff --git a/resources/views/tags/show.twig b/resources/views/tags/show.twig index 3f5a81478d..c7820c6beb 100644 --- a/resources/views/tags/show.twig +++ b/resources/views/tags/show.twig @@ -29,22 +29,22 @@
    {% if tag.description %} - - - - + + + + {% endif %} {% if tag.date %} - - - - + + + + {% endif %} @@ -196,7 +196,7 @@ {% endblock %} {% block styles %} - + {% endblock %} {% block scripts %}
    - {{ trans('list.description') }} - {{ tag.description }}
    + {{ trans('list.description') }} + {{ tag.description }}
    - {{ trans('list.date') }} - - {{ tag.date.formatLocalized(monthAndDayFormat) }} -
    + {{ trans('list.date') }} + + {{ tag.date.formatLocalized(monthAndDayFormat) }} +
    {{ trans('list.sum') }}