mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Expand tests, do code cleanup.
This commit is contained in:
@@ -26,7 +26,7 @@ use DB;
|
|||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountMeta;
|
use FireflyIII\Models\AccountMeta;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\BudgetLimit;
|
|
||||||
use FireflyIII\Models\LimitRepetition;
|
use FireflyIII\Models\LimitRepetition;
|
||||||
use FireflyIII\Models\Note;
|
use FireflyIII\Models\Note;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
@@ -75,6 +75,8 @@ class UpgradeDatabase extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
@@ -282,6 +284,8 @@ class UpgradeDatabase extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Move all the journal_meta notes to their note object counter parts.
|
* Move all the journal_meta notes to their note object counter parts.
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function migrateNotes(): void
|
private function migrateNotes(): void
|
||||||
{
|
{
|
||||||
|
@@ -33,7 +33,13 @@ class AdminRequestedTestMessage extends Event
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
public $ipAddress;
|
public $ipAddress;
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
public $user;
|
public $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -32,7 +32,13 @@ class RegisteredUser extends Event
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
public $ipAddress;
|
public $ipAddress;
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
public $user;
|
public $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -32,8 +32,17 @@ class RequestedNewPassword extends Event
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
public $ipAddress;
|
public $ipAddress;
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
public $token;
|
public $token;
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
public $user;
|
public $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -28,6 +28,9 @@ use FireflyIII\Jobs\MailError;
|
|||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Request;
|
use Request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Handler
|
||||||
|
*/
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -78,6 +81,7 @@ class Handler extends ExceptionHandler
|
|||||||
* @param \Exception $exception
|
* @param \Exception $exception
|
||||||
*
|
*
|
||||||
* @return mixed|void
|
* @return mixed|void
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function report(Exception $exception)
|
public function report(Exception $exception)
|
||||||
{
|
{
|
||||||
|
@@ -45,44 +45,131 @@ use FireflyIII\Models\Transaction;
|
|||||||
final class Entry
|
final class Entry
|
||||||
{
|
{
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $journal_id;
|
public $journal_id;
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
public $transaction_id = 0;
|
public $transaction_id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $date;
|
public $date;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $description;
|
public $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $currency_code;
|
public $currency_code;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $amount;
|
public $amount;
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
public $foreign_currency_code = '';
|
public $foreign_currency_code = '';
|
||||||
public $foreign_amount = '0';
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $foreign_amount = '0';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $transaction_type;
|
public $transaction_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_account_id;
|
public $asset_account_id;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_account_name;
|
public $asset_account_name;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_account_iban;
|
public $asset_account_iban;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_account_bic;
|
public $asset_account_bic;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_account_number;
|
public $asset_account_number;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $asset_currency_code;
|
public $asset_currency_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_account_id;
|
public $opposing_account_id;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_account_name;
|
public $opposing_account_name;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_account_iban;
|
public $opposing_account_iban;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_account_bic;
|
public $opposing_account_bic;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_account_number;
|
public $opposing_account_number;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $opposing_currency_code;
|
public $opposing_currency_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $budget_id;
|
public $budget_id;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $budget_name;
|
public $budget_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $category_id;
|
public $category_id;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $category_name;
|
public $category_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $bill_id;
|
public $bill_id;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $bill_name;
|
public $bill_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $notes;
|
public $notes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
public $tags;
|
public $tags;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -173,6 +173,7 @@ class ExpandedProcessor implements ProcessorInterface
|
|||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function createZipFile(): bool
|
public function createZipFile(): bool
|
||||||
{
|
{
|
||||||
|
@@ -52,6 +52,7 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \TypeError
|
||||||
*/
|
*/
|
||||||
public function run(): bool
|
public function run(): bool
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function generate(): string
|
public function generate(): string
|
||||||
{
|
{
|
||||||
|
@@ -40,6 +40,7 @@ class MultiYearReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function generate(): string
|
public function generate(): string
|
||||||
{
|
{
|
||||||
|
@@ -40,6 +40,7 @@ class YearReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function generate(): string
|
public function generate(): string
|
||||||
{
|
{
|
||||||
|
@@ -32,9 +32,18 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
class BalanceLine
|
class BalanceLine
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
const ROLE_DEFAULTROLE = 1;
|
const ROLE_DEFAULTROLE = 1;
|
||||||
const ROLE_TAGROLE = 2;
|
/**
|
||||||
const ROLE_DIFFROLE = 3;
|
*
|
||||||
|
*/
|
||||||
|
const ROLE_TAGROLE = 2;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const ROLE_DIFFROLE = 3;
|
||||||
|
|
||||||
/** @var Collection */
|
/** @var Collection */
|
||||||
protected $balanceEntries;
|
protected $balanceEntries;
|
||||||
|
@@ -203,6 +203,11 @@ interface JournalCollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function setTypes(array $types): JournalCollectorInterface;
|
public function setTypes(array $types): JournalCollectorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public function setUser(User $user);
|
public function setUser(User $user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -37,6 +37,11 @@ class AmountFilter implements FilterInterface
|
|||||||
/** @var int */
|
/** @var int */
|
||||||
private $modifier = 0;
|
private $modifier = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AmountFilter constructor.
|
||||||
|
*
|
||||||
|
* @param int $modifier
|
||||||
|
*/
|
||||||
public function __construct(int $modifier)
|
public function __construct(int $modifier)
|
||||||
{
|
{
|
||||||
$this->modifier = $modifier;
|
$this->modifier = $modifier;
|
||||||
|
@@ -24,6 +24,11 @@ namespace FireflyIII\Helpers\Filter;
|
|||||||
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface FilterInterface
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Helpers\Filter
|
||||||
|
*/
|
||||||
interface FilterInterface
|
interface FilterInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -34,6 +34,9 @@ use Route;
|
|||||||
*/
|
*/
|
||||||
class Help implements HelpInterface
|
class Help implements HelpInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
const CACHEKEY = 'help_%s_%s';
|
const CACHEKEY = 'help_%s_%s';
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36';
|
protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36';
|
||||||
|
@@ -111,6 +111,7 @@ class ReconcileController extends Controller
|
|||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function overview(Request $request, Account $account, Carbon $start, Carbon $end)
|
public function overview(Request $request, Account $account, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -165,6 +166,7 @@ class ReconcileController extends Controller
|
|||||||
* @param Carbon|null $end
|
* @param Carbon|null $end
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function reconcile(Account $account, Carbon $start = null, Carbon $end = null)
|
public function reconcile(Account $account, Carbon $start = null, Carbon $end = null)
|
||||||
{
|
{
|
||||||
@@ -294,6 +296,8 @@ class ReconcileController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function transactions(Account $account, Carbon $start, Carbon $end)
|
public function transactions(Account $account, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -151,6 +151,9 @@ class AccountController extends Controller
|
|||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function edit(Request $request, Account $account)
|
public function edit(Request $request, Account $account)
|
||||||
{
|
{
|
||||||
@@ -258,6 +261,7 @@ class AccountController extends Controller
|
|||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // long and complex but not that excessively so.
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // long and complex but not that excessively so.
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, JournalRepositoryInterface $repository, Account $account, string $moment = '')
|
public function show(Request $request, JournalRepositoryInterface $repository, Account $account, string $moment = '')
|
||||||
{
|
{
|
||||||
|
@@ -206,6 +206,13 @@ class LinkController extends Controller
|
|||||||
return redirect($this->getPreviousUri('link_types.create.uri'));
|
return redirect($this->getPreviousUri('link_types.create.uri'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param LinkTypeFormRequest $request
|
||||||
|
* @param LinkTypeRepositoryInterface $repository
|
||||||
|
* @param LinkType $linkType
|
||||||
|
*
|
||||||
|
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
|
*/
|
||||||
public function update(LinkTypeFormRequest $request, LinkTypeRepositoryInterface $repository, LinkType $linkType)
|
public function update(LinkTypeFormRequest $request, LinkTypeRepositoryInterface $repository, LinkType $linkType)
|
||||||
{
|
{
|
||||||
if (!$linkType->editable) {
|
if (!$linkType->editable) {
|
||||||
|
@@ -149,6 +149,7 @@ class AttachmentController extends Controller
|
|||||||
* @param Attachment $attachment
|
* @param Attachment $attachment
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function preview(Attachment $attachment)
|
public function preview(Attachment $attachment)
|
||||||
{
|
{
|
||||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Controllers\Auth;
|
|||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ForgotPasswordController
|
||||||
|
*/
|
||||||
class ForgotPasswordController extends Controller
|
class ForgotPasswordController extends Controller
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@@ -31,6 +31,9 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Session;
|
use Session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RegisterController
|
||||||
|
*/
|
||||||
class RegisterController extends Controller
|
class RegisterController extends Controller
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Controllers\Auth;
|
|||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ResetPasswordController
|
||||||
|
*/
|
||||||
class ResetPasswordController extends Controller
|
class ResetPasswordController extends Controller
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@@ -70,7 +70,6 @@ class TwoFactorController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
public function lostTwoFactor()
|
public function lostTwoFactor()
|
||||||
{
|
{
|
||||||
|
@@ -73,8 +73,9 @@ class BudgetController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param Budget $budget
|
* @param BudgetRepositoryInterface $repository
|
||||||
|
* @param Budget $budget
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
|
@@ -342,7 +342,6 @@ class AccountController extends Controller
|
|||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
public function period(Account $account, Carbon $start)
|
public function period(Account $account, Carbon $start)
|
||||||
{
|
{
|
||||||
|
@@ -38,6 +38,9 @@ use FireflyIII\Support\CacheProperties;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Response;
|
use Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TagReportController
|
||||||
|
*/
|
||||||
class TagReportController extends Controller
|
class TagReportController extends Controller
|
||||||
{
|
{
|
||||||
/** @var GeneratorInterface */
|
/** @var GeneratorInterface */
|
||||||
|
@@ -273,6 +273,8 @@ class HomeController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function testFlash(Request $request)
|
public function testFlash(Request $request)
|
||||||
|
@@ -27,6 +27,9 @@ use FireflyIII\Http\Controllers\Controller;
|
|||||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||||
use FireflyIII\Support\Import\Prerequisites\PrerequisitesInterface;
|
use FireflyIII\Support\Import\Prerequisites\PrerequisitesInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class BankController
|
||||||
|
*/
|
||||||
class BankController extends Controller
|
class BankController extends Controller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -87,7 +87,10 @@ class JavascriptController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
|
* @param AccountRepositoryInterface $repository
|
||||||
|
* @param CurrencyRepositoryInterface $currencyRepository
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
|
@@ -36,6 +36,7 @@ class FrontpageController extends Controller
|
|||||||
* @param PiggyBankRepositoryInterface $repository
|
* @param PiggyBankRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function piggyBanks(PiggyBankRepositoryInterface $repository)
|
public function piggyBanks(PiggyBankRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
|
@@ -46,6 +46,7 @@ class JsonController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function action(Request $request)
|
public function action(Request $request)
|
||||||
{
|
{
|
||||||
@@ -120,6 +121,7 @@ class JsonController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function trigger(Request $request)
|
public function trigger(Request $request)
|
||||||
{
|
{
|
||||||
|
@@ -81,6 +81,11 @@ class ReportController extends Controller
|
|||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function general(Request $request)
|
public function general(Request $request)
|
||||||
{
|
{
|
||||||
@@ -119,6 +124,7 @@ class ReportController extends Controller
|
|||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function balanceAmount(array $attributes): string
|
private function balanceAmount(array $attributes): string
|
||||||
{
|
{
|
||||||
@@ -156,7 +162,7 @@ class ReportController extends Controller
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function budgetSpentAmount(array $attributes): string
|
private function budgetSpentAmount(array $attributes): string
|
||||||
{
|
{
|
||||||
@@ -170,11 +176,11 @@ class ReportController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Returns all expenses in category in range.
|
* Returns all expenses in category in range.
|
||||||
*
|
*
|
||||||
* @param $attributes
|
* @param array $attributes
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function categoryEntry(array $attributes): string
|
private function categoryEntry(array $attributes): string
|
||||||
{
|
{
|
||||||
@@ -188,11 +194,11 @@ class ReportController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Returns all the expenses that went to the given expense account.
|
* Returns all the expenses that went to the given expense account.
|
||||||
*
|
*
|
||||||
* @param $attributes
|
* @param array $attributes
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function expenseEntry(array $attributes): string
|
private function expenseEntry(array $attributes): string
|
||||||
{
|
{
|
||||||
@@ -206,11 +212,11 @@ class ReportController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Returns all the incomes that went to the given asset account.
|
* Returns all the incomes that went to the given asset account.
|
||||||
*
|
*
|
||||||
* @param $attributes
|
* @param array $attributes
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function incomeEntry(array $attributes): string
|
private function incomeEntry(array $attributes): string
|
||||||
{
|
{
|
||||||
|
@@ -71,6 +71,8 @@ class PreferencesController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function deleteCode()
|
public function deleteCode()
|
||||||
{
|
{
|
||||||
|
@@ -259,8 +259,9 @@ class ProfileController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $token
|
* @param UserRepositoryInterface $repository
|
||||||
* @param string $hash
|
* @param string $token
|
||||||
|
* @param string $hash
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*
|
*
|
||||||
|
@@ -39,6 +39,7 @@ class AccountController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -40,6 +40,7 @@ class BalanceController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function general(BalanceReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end)
|
public function general(BalanceReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ class BudgetController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end)
|
public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -68,6 +69,7 @@ class BudgetController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
public function period(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -40,6 +40,7 @@ class CategoryController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,7 @@ class CategoryController extends Controller
|
|||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function income(Collection $accounts, Carbon $start, Carbon $end)
|
public function income(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -104,6 +106,7 @@ class CategoryController extends Controller
|
|||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
*
|
*
|
||||||
* @internal param ReportHelperInterface $helper
|
* @internal param ReportHelperInterface $helper
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -211,6 +211,15 @@ class ExpenseController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $accounts
|
||||||
|
* @param Collection $expense
|
||||||
|
* @param Carbon $start
|
||||||
|
* @param Carbon $end
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
|
*/
|
||||||
public function topExpense(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
public function topExpense(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
// Properties for cache:
|
// Properties for cache:
|
||||||
@@ -246,6 +255,15 @@ class ExpenseController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $accounts
|
||||||
|
* @param Collection $expense
|
||||||
|
* @param Carbon $start
|
||||||
|
* @param Carbon $end
|
||||||
|
*
|
||||||
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
|
*/
|
||||||
public function topIncome(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
public function topIncome(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
// Properties for cache:
|
// Properties for cache:
|
||||||
@@ -366,6 +384,14 @@ class ExpenseController extends Controller
|
|||||||
return $sum;
|
return $sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $assets
|
||||||
|
* @param Collection $opposing
|
||||||
|
* @param Carbon $start
|
||||||
|
* @param Carbon $end
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
|
protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
|
||||||
{
|
{
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
@@ -40,6 +40,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function expenses(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
public function expenses(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -67,6 +68,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function income(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
public function income(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
@@ -95,6 +97,7 @@ class OperationsController extends Controller
|
|||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function operations(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
public function operations(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end)
|
||||||
{
|
{
|
||||||
|
@@ -72,6 +72,8 @@ class RuleController extends Controller
|
|||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function create(Request $request, RuleGroup $ruleGroup)
|
public function create(Request $request, RuleGroup $ruleGroup)
|
||||||
{
|
{
|
||||||
@@ -164,6 +166,10 @@ class RuleController extends Controller
|
|||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function edit(Request $request, RuleRepositoryInterface $repository, Rule $rule)
|
public function edit(Request $request, RuleRepositoryInterface $repository, Rule $rule)
|
||||||
{
|
{
|
||||||
@@ -356,6 +362,7 @@ class RuleController extends Controller
|
|||||||
* @param TestRuleFormRequest $request
|
* @param TestRuleFormRequest $request
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function testTriggers(TestRuleFormRequest $request)
|
public function testTriggers(TestRuleFormRequest $request)
|
||||||
{
|
{
|
||||||
@@ -528,6 +535,7 @@ class RuleController extends Controller
|
|||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function getCurrentActions(Rule $rule)
|
private function getCurrentActions(Rule $rule)
|
||||||
{
|
{
|
||||||
@@ -556,6 +564,7 @@ class RuleController extends Controller
|
|||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function getCurrentTriggers(Rule $rule)
|
private function getCurrentTriggers(Rule $rule)
|
||||||
{
|
{
|
||||||
@@ -586,6 +595,7 @@ class RuleController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function getPreviousActions(Request $request)
|
private function getPreviousActions(Request $request)
|
||||||
{
|
{
|
||||||
@@ -615,6 +625,7 @@ class RuleController extends Controller
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
private function getPreviousTriggers(Request $request)
|
private function getPreviousTriggers(Request $request)
|
||||||
{
|
{
|
||||||
|
@@ -69,6 +69,13 @@ class SearchController extends Controller
|
|||||||
return view('search.index', compact('query', 'fullQuery', 'subTitle'));
|
return view('search.index', compact('query', 'fullQuery', 'subTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Request $request
|
||||||
|
* @param SearchInterface $searcher
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
* @throws \Throwable
|
||||||
|
*/
|
||||||
public function search(Request $request, SearchInterface $searcher)
|
public function search(Request $request, SearchInterface $searcher)
|
||||||
{
|
{
|
||||||
$fullQuery = strval($request->get('query'));
|
$fullQuery = strval($request->get('query'));
|
||||||
@@ -79,7 +86,7 @@ class SearchController extends Controller
|
|||||||
$cache->addProperty($fullQuery);
|
$cache->addProperty($fullQuery);
|
||||||
|
|
||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
$transactions = $cache->get();
|
$transactions = $cache->get(); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$cache->has()) {
|
if (!$cache->has()) {
|
||||||
|
@@ -161,7 +161,7 @@ class TagController extends Controller
|
|||||||
$start = new Carbon;
|
$start = new Carbon;
|
||||||
if (null !== $oldestTag) {
|
if (null !== $oldestTag) {
|
||||||
/** @var Carbon $start */
|
/** @var Carbon $start */
|
||||||
$start = $oldestTag->date;
|
$start = $oldestTag->date; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
if (null === $oldestTag) {
|
if (null === $oldestTag) {
|
||||||
/** @var Carbon $start */
|
/** @var Carbon $start */
|
||||||
|
@@ -128,6 +128,8 @@ class ConvertController extends Controller
|
|||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal)
|
public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal)
|
||||||
{
|
{
|
||||||
|
@@ -97,6 +97,11 @@ class SingleController extends Controller
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param TransactionJournal $journal
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
|
*/
|
||||||
public function cloneTransaction(TransactionJournal $journal)
|
public function cloneTransaction(TransactionJournal $journal)
|
||||||
{
|
{
|
||||||
$source = $journal->sourceAccountList()->first();
|
$source = $journal->sourceAccountList()->first();
|
||||||
@@ -149,7 +154,8 @@ class SingleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $what
|
* @param Request $request
|
||||||
|
* @param string $what
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
|
@@ -69,6 +69,7 @@ class TransactionController extends Controller
|
|||||||
* @param string $moment
|
* @param string $moment
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = '')
|
public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = '')
|
||||||
{
|
{
|
||||||
@@ -128,6 +129,8 @@ class TransactionController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param JournalRepositoryInterface $repository
|
* @param JournalRepositoryInterface $repository
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function reconcile(Request $request, JournalRepositoryInterface $repository)
|
public function reconcile(Request $request, JournalRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
@@ -139,6 +142,7 @@ class TransactionController extends Controller
|
|||||||
|
|
||||||
$repository->reconcile($transaction);
|
$repository->reconcile($transaction);
|
||||||
}
|
}
|
||||||
|
return Response::json(['ok'=>'reconciled']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -180,7 +184,7 @@ class TransactionController extends Controller
|
|||||||
return $this->redirectToAccount($journal);
|
return $this->redirectToAccount($journal);
|
||||||
}
|
}
|
||||||
if ($journal->transactionType->type === TransactionType::RECONCILIATION) {
|
if ($journal->transactionType->type === TransactionType::RECONCILIATION) {
|
||||||
return redirect(route('accounts.reconcile.show', [$journal->id]));
|
return redirect(route('accounts.reconcile.show', [$journal->id])); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
$linkTypes = $linkTypeRepository->get();
|
$linkTypes = $linkTypeRepository->get();
|
||||||
$links = $linkTypeRepository->getLinks($journal);
|
$links = $linkTypeRepository->getLinks($journal);
|
||||||
@@ -197,7 +201,6 @@ class TransactionController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
private function getPeriodOverview(string $what): Collection
|
private function getPeriodOverview(string $what): Collection
|
||||||
{
|
{
|
||||||
@@ -248,7 +251,7 @@ class TransactionController extends Controller
|
|||||||
];
|
];
|
||||||
Log::debug(sprintf('What is %s', $what));
|
Log::debug(sprintf('What is %s', $what));
|
||||||
if ($journals->count() > 0) {
|
if ($journals->count() > 0) {
|
||||||
$entries->push($array);
|
$entries->push($array); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
$end = app('navigation')->subtractPeriod($end, $range, 1);
|
$end = app('navigation')->subtractPeriod($end, $range, 1);
|
||||||
}
|
}
|
||||||
|
@@ -46,6 +46,9 @@ use Illuminate\Routing\Middleware\SubstituteBindings;
|
|||||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Kernel
|
||||||
|
*/
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -31,6 +31,9 @@ use Illuminate\Http\Request;
|
|||||||
*/
|
*/
|
||||||
class Binder
|
class Binder
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $binders = [];
|
protected $binders = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
|
|
||||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class EncryptCookies
|
||||||
|
*/
|
||||||
class EncryptCookies extends Middleware
|
class EncryptCookies extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RedirectIfAuthenticated
|
||||||
|
*/
|
||||||
class RedirectIfAuthenticated
|
class RedirectIfAuthenticated
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TrimStrings
|
||||||
|
*/
|
||||||
class TrimStrings extends Middleware
|
class TrimStrings extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -26,6 +26,9 @@ use Fideloper\Proxy\TrustProxies as Middleware;
|
|||||||
use Illuminate\Contracts\Config\Repository;
|
use Illuminate\Contracts\Config\Repository;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TrustProxies
|
||||||
|
*/
|
||||||
class TrustProxies extends Middleware
|
class TrustProxies extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -24,6 +24,9 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class VerifyCsrfToken
|
||||||
|
*/
|
||||||
class VerifyCsrfToken extends Middleware
|
class VerifyCsrfToken extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -84,6 +84,7 @@ class JournalFormRequest extends Request
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
|
@@ -70,6 +70,7 @@ class CsvProcessor implements FileProcessorInterface
|
|||||||
* Does the actual job.
|
* Does the actual job.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \League\Csv\Exception
|
||||||
*/
|
*/
|
||||||
public function run(): bool
|
public function run(): bool
|
||||||
{
|
{
|
||||||
@@ -159,6 +160,9 @@ class CsvProcessor implements FileProcessorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Iterator
|
* @return Iterator
|
||||||
|
* @throws \League\Csv\Exception
|
||||||
|
* @throws \League\Csv\Exception
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
private function getImportArray(): Iterator
|
private function getImportArray(): Iterator
|
||||||
{
|
{
|
||||||
@@ -275,6 +279,7 @@ class CsvProcessor implements FileProcessorInterface
|
|||||||
* @param array $array
|
* @param array $array
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function rowAlreadyImported(array $array): bool
|
private function rowAlreadyImported(array $array): bool
|
||||||
{
|
{
|
||||||
|
@@ -28,6 +28,9 @@ use FireflyIII\User;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ImportCategory
|
||||||
|
*/
|
||||||
class ImportCategory
|
class ImportCategory
|
||||||
{
|
{
|
||||||
/** @var Category */
|
/** @var Category */
|
||||||
|
@@ -27,6 +27,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
|||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ImportCurrency
|
||||||
|
*/
|
||||||
class ImportCurrency
|
class ImportCurrency
|
||||||
{
|
{
|
||||||
/** @var array */
|
/** @var array */
|
||||||
|
@@ -155,6 +155,7 @@ class BunqPrerequisites implements PrerequisitesInterface
|
|||||||
* @return DeviceServerId
|
* @return DeviceServerId
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function getExistingDevice(): DeviceServerId
|
private function getExistingDevice(): DeviceServerId
|
||||||
{
|
{
|
||||||
@@ -292,6 +293,10 @@ class BunqPrerequisites implements PrerequisitesInterface
|
|||||||
* - Use this token to send a device server request
|
* - Use this token to send a device server request
|
||||||
* - Store the installation token
|
* - Store the installation token
|
||||||
* - Use the installation token each time we need a session.
|
* - Use the installation token each time we need a session.
|
||||||
|
*
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
private function registerDevice(): DeviceServerId
|
private function registerDevice(): DeviceServerId
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,11 @@ use FireflyIII\User;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface PrerequisitesInterface
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Import\Prerequisites
|
||||||
|
*/
|
||||||
interface PrerequisitesInterface
|
interface PrerequisitesInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -25,6 +25,11 @@ namespace FireflyIII\Import\Routine;
|
|||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface RoutineInterface
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Import\Routine
|
||||||
|
*/
|
||||||
interface RoutineInterface
|
interface RoutineInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -408,6 +408,12 @@ trait ImportSupport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $parameters
|
||||||
|
*
|
||||||
|
* @return TransactionJournal
|
||||||
|
* @throws FireflyException
|
||||||
|
*/
|
||||||
private function storeJournal(array $parameters): TransactionJournal
|
private function storeJournal(array $parameters): TransactionJournal
|
||||||
{
|
{
|
||||||
// find transaction type:
|
// find transaction type:
|
||||||
|
@@ -13,14 +13,22 @@ use Illuminate\Queue\InteractsWithQueue;
|
|||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class GetSpectreProviders
|
||||||
|
*/
|
||||||
class GetSpectreProviders implements ShouldQueue
|
class GetSpectreProviders implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
*/
|
*/
|
||||||
public function __construct(User $user)
|
public function __construct(User $user)
|
||||||
{
|
{
|
||||||
@@ -30,6 +38,9 @@ class GetSpectreProviders implements ShouldQueue
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the job.
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Container\EntryNotFoundException
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
@@ -59,6 +59,9 @@ class Account extends Model
|
|||||||
protected $fillable = ['user_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
|
protected $fillable = ['user_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban'];
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $hidden = ['encrypted'];
|
protected $hidden = ['encrypted'];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $rules
|
protected $rules
|
||||||
= [
|
= [
|
||||||
'user_id' => 'required|exists:users,id',
|
'user_id' => 'required|exists:users,id',
|
||||||
@@ -216,7 +219,6 @@ class Account extends Model
|
|||||||
*
|
*
|
||||||
* @return TransactionJournal
|
* @return TransactionJournal
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
public function getOpeningBalance(): TransactionJournal
|
public function getOpeningBalance(): TransactionJournal
|
||||||
{
|
{
|
||||||
@@ -267,7 +269,6 @@ class Account extends Model
|
|||||||
*
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
*/
|
||||||
public function getOpeningBalanceDate(): Carbon
|
public function getOpeningBalanceDate(): Carbon
|
||||||
{
|
{
|
||||||
|
@@ -42,7 +42,10 @@ class AccountMeta extends Model
|
|||||||
];
|
];
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $fillable = ['account_id', 'name', 'data'];
|
protected $fillable = ['account_id', 'name', 'data'];
|
||||||
protected $table = 'account_meta';
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $table = 'account_meta';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return BelongsTo
|
* @return BelongsTo
|
||||||
|
@@ -31,15 +31,42 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
|||||||
class AccountType extends Model
|
class AccountType extends Model
|
||||||
{
|
{
|
||||||
const DEFAULT = 'Default account';
|
const DEFAULT = 'Default account';
|
||||||
const CASH = 'Cash account';
|
/**
|
||||||
const ASSET = 'Asset account';
|
*
|
||||||
const EXPENSE = 'Expense account';
|
*/
|
||||||
const REVENUE = 'Revenue account';
|
const CASH = 'Cash account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const ASSET = 'Asset account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const EXPENSE = 'Expense account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const REVENUE = 'Revenue account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
const INITIAL_BALANCE = 'Initial balance account';
|
const INITIAL_BALANCE = 'Initial balance account';
|
||||||
const BENEFICIARY = 'Beneficiary account';
|
/**
|
||||||
const IMPORT = 'Import account';
|
*
|
||||||
const RECONCILIATION = 'Reconciliation account';
|
*/
|
||||||
const LOAN = 'Loan';
|
const BENEFICIARY = 'Beneficiary account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const IMPORT = 'Import account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const RECONCILIATION = 'Reconciliation account';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const LOAN = 'Loan';
|
||||||
/**
|
/**
|
||||||
* The attributes that should be casted to native types.
|
* The attributes that should be casted to native types.
|
||||||
*
|
*
|
||||||
|
@@ -53,11 +53,20 @@ class Bill extends Model
|
|||||||
'name_encrypted' => 'boolean',
|
'name_encrypted' => 'boolean',
|
||||||
'match_encrypted' => 'boolean',
|
'match_encrypted' => 'boolean',
|
||||||
];
|
];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $fillable
|
protected $fillable
|
||||||
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip',
|
= ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip',
|
||||||
'automatch', 'active',];
|
'automatch', 'active',];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
|
protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted'];
|
||||||
protected $rules = ['name' => 'required|between:1,200'];
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $rules = ['name' => 'required|between:1,200'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Bill $value
|
* @param Bill $value
|
||||||
|
@@ -42,6 +42,9 @@ class Configuration extends Model
|
|||||||
'created_at' => 'datetime',
|
'created_at' => 'datetime',
|
||||||
'updated_at' => 'datetime',
|
'updated_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $table = 'configuration';
|
protected $table = 'configuration';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -44,6 +44,9 @@ class ImportJob extends Model
|
|||||||
'updated_at' => 'datetime',
|
'updated_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $validStatus
|
protected $validStatus
|
||||||
= [
|
= [
|
||||||
'new',
|
'new',
|
||||||
@@ -176,6 +179,7 @@ class ImportJob extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function uploadFileContents(): string
|
public function uploadFileContents(): string
|
||||||
{
|
{
|
||||||
|
@@ -65,6 +65,9 @@ class LinkType extends Model
|
|||||||
throw new NotFoundHttpException;
|
throw new NotFoundHttpException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
|
*/
|
||||||
public function transactionJournalLinks()
|
public function transactionJournalLinks()
|
||||||
{
|
{
|
||||||
return $this->hasMany(TransactionJournalLink::class);
|
return $this->hasMany(TransactionJournalLink::class);
|
||||||
|
@@ -42,8 +42,14 @@ class PiggyBankEvent extends Model
|
|||||||
];
|
];
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $dates = ['date'];
|
protected $dates = ['date'];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];
|
protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount'];
|
||||||
protected $hidden = ['amount_encrypted'];
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = ['amount_encrypted'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
@@ -41,7 +41,10 @@ class Role extends Model
|
|||||||
'updated_at' => 'datetime',
|
'updated_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $fillable = ['name','display_name','description'];
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = ['name', 'display_name', 'description'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||||
|
@@ -46,6 +46,9 @@ class RuleGroup extends Model
|
|||||||
'order' => 'int',
|
'order' => 'int',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];
|
protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -27,6 +27,9 @@ class SpectreProvider extends Model
|
|||||||
'data' => 'array',
|
'data' => 'array',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $fillable = ['spectre_id', 'code', 'mode', 'name', 'status', 'interactive', 'automatic_fetch', 'country_code', 'data'];
|
protected $fillable = ['spectre_id', 'code', 'mode', 'name', 'status', 'interactive', 'automatic_fetch', 'country_code', 'data'];
|
||||||
|
|
||||||
}
|
}
|
@@ -105,6 +105,7 @@ class Tag extends Model
|
|||||||
* @param Tag $tag
|
* @param Tag $tag
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public static function tagSum(self $tag): string
|
public static function tagSum(self $tag): string
|
||||||
{
|
{
|
||||||
|
@@ -84,10 +84,19 @@ class Transaction extends Model
|
|||||||
'bill_name_encrypted' => 'boolean',
|
'bill_name_encrypted' => 'boolean',
|
||||||
'reconciled' => 'boolean',
|
'reconciled' => 'boolean',
|
||||||
];
|
];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $fillable
|
protected $fillable
|
||||||
= ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id',
|
= ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id',
|
||||||
'foreign_amount',];
|
'foreign_amount',];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $hidden = ['encrypted'];
|
protected $hidden = ['encrypted'];
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $rules
|
protected $rules
|
||||||
= [
|
= [
|
||||||
'account_id' => 'required|exists:accounts,id',
|
'account_id' => 'required|exists:accounts,id',
|
||||||
|
@@ -32,6 +32,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
*/
|
*/
|
||||||
class TransactionJournalLink extends Model
|
class TransactionJournalLink extends Model
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $table = 'journal_links';
|
protected $table = 'journal_links';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -33,11 +33,26 @@ class TransactionType extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
const WITHDRAWAL = 'Withdrawal';
|
/**
|
||||||
const DEPOSIT = 'Deposit';
|
*
|
||||||
const TRANSFER = 'Transfer';
|
*/
|
||||||
|
const WITHDRAWAL = 'Withdrawal';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const DEPOSIT = 'Deposit';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const TRANSFER = 'Transfer';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
const OPENING_BALANCE = 'Opening balance';
|
const OPENING_BALANCE = 'Opening balance';
|
||||||
const RECONCILIATION = 'Reconciliation';
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
const RECONCILIATION = 'Reconciliation';
|
||||||
/**
|
/**
|
||||||
* The attributes that should be casted to native types.
|
* The attributes that should be casted to native types.
|
||||||
*
|
*
|
||||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Providers;
|
|||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class RouteServiceProvider
|
||||||
|
*/
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -72,6 +72,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param Account $moveTo
|
* @param Account $moveTo
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Account $account, Account $moveTo): bool
|
public function destroy(Account $account, Account $moveTo): bool
|
||||||
{
|
{
|
||||||
@@ -239,6 +240,8 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected function deleteInitialBalance(Account $account)
|
protected function deleteInitialBalance(Account $account)
|
||||||
{
|
{
|
||||||
@@ -410,6 +413,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
*
|
*
|
||||||
* @return Account
|
* @return Account
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
protected function storeOpposingAccount(string $name): Account
|
protected function storeOpposingAccount(string $name): Account
|
||||||
{
|
{
|
||||||
@@ -507,6 +511,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, array $data): bool
|
protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, array $data): bool
|
||||||
{
|
{
|
||||||
|
@@ -211,6 +211,7 @@ trait FindAccountsTrait
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Account
|
* @return Account
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getCashAccount(): Account
|
public function getCashAccount(): Account
|
||||||
{
|
{
|
||||||
|
@@ -43,6 +43,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
|||||||
* @param Attachment $attachment
|
* @param Attachment $attachment
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Attachment $attachment): bool
|
public function destroy(Attachment $attachment): bool
|
||||||
{
|
{
|
||||||
@@ -129,6 +130,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
|||||||
* @param Attachment $attachment
|
* @param Attachment $attachment
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function getContent(Attachment $attachment): string
|
public function getContent(Attachment $attachment): string
|
||||||
{
|
{
|
||||||
|
@@ -48,6 +48,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Bill $bill): bool
|
public function destroy(Bill $bill): bool
|
||||||
{
|
{
|
||||||
@@ -390,6 +391,8 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return \Carbon\Carbon
|
* @return \Carbon\Carbon
|
||||||
|
* @throws \FireflyIII\Support\Facades\FireflyException
|
||||||
|
* @throws \FireflyIII\Support\Facades\FireflyException
|
||||||
*/
|
*/
|
||||||
public function nextDateMatch(Bill $bill, Carbon $date): Carbon
|
public function nextDateMatch(Bill $bill, Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
@@ -427,6 +430,9 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
|
* @throws \FireflyIII\Support\Facades\FireflyException
|
||||||
|
* @throws \FireflyIII\Support\Facades\FireflyException
|
||||||
|
* @throws \FireflyIII\Support\Facades\FireflyException
|
||||||
*/
|
*/
|
||||||
public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon
|
public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,8 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function cleanupBudgets(): bool
|
public function cleanupBudgets(): bool
|
||||||
{
|
{
|
||||||
@@ -123,6 +125,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Budget $budget): bool
|
public function destroy(Budget $budget): bool
|
||||||
{
|
{
|
||||||
@@ -604,6 +607,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
* @param string $amount
|
* @param string $amount
|
||||||
*
|
*
|
||||||
* @return BudgetLimit
|
* @return BudgetLimit
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit
|
public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit
|
||||||
{
|
{
|
||||||
|
@@ -44,6 +44,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
|||||||
* @param Category $category
|
* @param Category $category
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Category $category): bool
|
public function destroy(Category $category): bool
|
||||||
{
|
{
|
||||||
|
@@ -53,6 +53,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function cleanup(): bool
|
public function cleanup(): bool
|
||||||
{
|
{
|
||||||
@@ -137,6 +138,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
|||||||
* @param ExportJob $job
|
* @param ExportJob $job
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function getContent(ExportJob $job): string
|
public function getContent(ExportJob $job): string
|
||||||
{
|
{
|
||||||
|
@@ -99,6 +99,7 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function delete(TransactionJournal $journal): bool
|
public function delete(TransactionJournal $journal): bool
|
||||||
{
|
{
|
||||||
@@ -273,6 +274,8 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return TransactionJournal
|
* @return TransactionJournal
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function store(array $data): TransactionJournal
|
public function store(array $data): TransactionJournal
|
||||||
{
|
{
|
||||||
@@ -358,6 +361,10 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return TransactionJournal
|
* @return TransactionJournal
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
|
* @throws \FireflyIII\Exceptions\FireflyException
|
||||||
*/
|
*/
|
||||||
public function update(TransactionJournal $journal, array $data): TransactionJournal
|
public function update(TransactionJournal $journal, array $data): TransactionJournal
|
||||||
{
|
{
|
||||||
|
@@ -119,6 +119,8 @@ trait SupportJournalsTrait
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
protected function storeDepositAccounts(User $user, array $data): array
|
protected function storeDepositAccounts(User $user, array $data): array
|
||||||
{
|
{
|
||||||
@@ -165,6 +167,8 @@ trait SupportJournalsTrait
|
|||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws FireflyException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
protected function storeWithdrawalAccounts(User $user, array $data): array
|
protected function storeWithdrawalAccounts(User $user, array $data): array
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
|||||||
* @param LinkType $moveTo
|
* @param LinkType $moveTo
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(LinkType $linkType, LinkType $moveTo): bool
|
public function destroy(LinkType $linkType, LinkType $moveTo): bool
|
||||||
{
|
{
|
||||||
@@ -66,6 +67,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
|||||||
* @param TransactionJournalLink $link
|
* @param TransactionJournalLink $link
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroyLink(TransactionJournalLink $link): bool
|
public function destroyLink(TransactionJournalLink $link): bool
|
||||||
{
|
{
|
||||||
|
@@ -49,6 +49,9 @@ class RuleRepository implements RuleRepositoryInterface
|
|||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Rule $rule): bool
|
public function destroy(Rule $rule): bool
|
||||||
{
|
{
|
||||||
|
@@ -49,6 +49,8 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface
|
|||||||
* @param RuleGroup|null $moveTo
|
* @param RuleGroup|null $moveTo
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool
|
public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool
|
||||||
{
|
{
|
||||||
|
@@ -74,6 +74,7 @@ class TagRepository implements TagRepositoryInterface
|
|||||||
* @param Tag $tag
|
* @param Tag $tag
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Tag $tag): bool
|
public function destroy(Tag $tag): bool
|
||||||
{
|
{
|
||||||
|
@@ -132,6 +132,7 @@ class UserRepository implements UserRepositoryInterface
|
|||||||
* @param User $user
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(User $user): bool
|
public function destroy(User $user): bool
|
||||||
{
|
{
|
||||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Services\Bunq\Object;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Services\Bunq\Id\DeviceServerId;
|
use FireflyIII\Services\Bunq\Id\DeviceServerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DeviceServer
|
||||||
|
*/
|
||||||
class DeviceServer extends BunqObject
|
class DeviceServer extends BunqObject
|
||||||
{
|
{
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
@@ -40,6 +43,11 @@ class DeviceServer extends BunqObject
|
|||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
private $updated;
|
private $updated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DeviceServer constructor.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
*/
|
||||||
public function __construct(array $data)
|
public function __construct(array $data)
|
||||||
{
|
{
|
||||||
$id = new DeviceServerId();
|
$id = new DeviceServerId();
|
||||||
|
@@ -31,7 +31,13 @@ class MonetaryAccountProfile extends BunqObject
|
|||||||
private $profileActionRequired = '';
|
private $profileActionRequired = '';
|
||||||
/** @var Amount */
|
/** @var Amount */
|
||||||
private $profileAmountRequired;
|
private $profileAmountRequired;
|
||||||
|
/**
|
||||||
|
* @var null
|
||||||
|
*/
|
||||||
private $profileDrain;
|
private $profileDrain;
|
||||||
|
/**
|
||||||
|
* @var null
|
||||||
|
*/
|
||||||
private $profileFill;
|
private $profileFill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -29,10 +29,19 @@ use Carbon\Carbon;
|
|||||||
*/
|
*/
|
||||||
class UserCompany extends BunqObject
|
class UserCompany extends BunqObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $addressMain;
|
private $addressMain;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $addressPostal;
|
private $addressPostal;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $aliases = [];
|
private $aliases = [];
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $avatar;
|
private $avatar;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $cocNumber = '';
|
private $cocNumber = '';
|
||||||
@@ -40,7 +49,13 @@ class UserCompany extends BunqObject
|
|||||||
private $counterBankIban = '';
|
private $counterBankIban = '';
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
private $created;
|
private $created;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $dailyLimit;
|
private $dailyLimit;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $directorAlias;
|
private $directorAlias;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $displayName = '';
|
private $displayName = '';
|
||||||
|
@@ -29,10 +29,19 @@ use Carbon\Carbon;
|
|||||||
*/
|
*/
|
||||||
class UserPerson extends BunqObject
|
class UserPerson extends BunqObject
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $addressMain;
|
private $addressMain;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $addressPostal;
|
private $addressPostal;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $aliases = [];
|
private $aliases = [];
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $avatar;
|
private $avatar;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $billingContracts = [];
|
private $billingContracts = [];
|
||||||
@@ -40,8 +49,17 @@ class UserPerson extends BunqObject
|
|||||||
private $countryOfBirth = '';
|
private $countryOfBirth = '';
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
private $created;
|
private $created;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $customer;
|
private $customer;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $customerLimit;
|
private $customerLimit;
|
||||||
|
/**
|
||||||
|
* @var
|
||||||
|
*/
|
||||||
private $dailyLimit;
|
private $dailyLimit;
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
private $dateOfBirth;
|
private $dateOfBirth;
|
||||||
@@ -77,6 +95,9 @@ class UserPerson extends BunqObject
|
|||||||
private $publicNickName = '';
|
private $publicNickName = '';
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $publicUuid = '';
|
private $publicUuid = '';
|
||||||
|
/**
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
private $region;
|
private $region;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $sessionTimeout = 0;
|
private $sessionTimeout = 0;
|
||||||
|
@@ -42,6 +42,9 @@ abstract class BunqRequest
|
|||||||
private $privateKey = '';
|
private $privateKey = '';
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $server = '';
|
private $server = '';
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $upperCaseHeaders
|
private $upperCaseHeaders
|
||||||
= [
|
= [
|
||||||
'x-bunq-client-response-id' => 'X-Bunq-Client-Response-Id',
|
'x-bunq-client-response-id' => 'X-Bunq-Client-Response-Id',
|
||||||
@@ -327,6 +330,7 @@ abstract class BunqRequest
|
|||||||
* @param array $headers
|
* @param array $headers
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function sendUnsignedBunqDelete(string $uri, array $headers): array
|
protected function sendUnsignedBunqDelete(string $uri, array $headers): array
|
||||||
{
|
{
|
||||||
@@ -356,6 +360,7 @@ abstract class BunqRequest
|
|||||||
* @param array $headers
|
* @param array $headers
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function sendUnsignedBunqPost(string $uri, array $data, array $headers): array
|
protected function sendUnsignedBunqPost(string $uri, array $data, array $headers): array
|
||||||
{
|
{
|
||||||
|
@@ -35,6 +35,7 @@ class DeleteDeviceSessionRequest extends BunqRequest
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function call(): void
|
public function call(): void
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ class DeviceServerRequest extends BunqRequest
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function call(): void
|
public function call(): void
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user