mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code for new release
This commit is contained in:
parent
f43b539470
commit
b557805eeb
@ -1,4 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ phpmd.xml
|
||||||
|
~ Copyright (c) 2023 james@firefly-iii.org
|
||||||
|
~
|
||||||
|
~ This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
|
~
|
||||||
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
|
~ it under the terms of the GNU Affero General Public License as
|
||||||
|
~ published by the Free Software Foundation, either version 3 of the
|
||||||
|
~ License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This program is distributed in the hope that it will be useful,
|
||||||
|
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
~ GNU Affero General Public License for more details.
|
||||||
|
~
|
||||||
|
~ You should have received a copy of the GNU Affero General Public License
|
||||||
|
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
-->
|
||||||
|
|
||||||
<ruleset name="pcsg-generated-ruleset"
|
<ruleset name="pcsg-generated-ruleset"
|
||||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* ShowController.php
|
* ShowController.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Api\V2\Controllers\Model\Budget;
|
namespace FireflyIII\Api\V2\Controllers\Model\Budget;
|
||||||
|
|
||||||
use FireflyIII\Api\V2\Controllers\Controller;
|
use FireflyIII\Api\V2\Controllers\Controller;
|
||||||
@ -42,8 +44,7 @@ class ShowController extends Controller
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->middleware(
|
$this->middleware(
|
||||||
function ($request, $next) {
|
function ($request, $next) {
|
||||||
@ -59,8 +60,7 @@ class ShowController extends Controller
|
|||||||
* TODO add URL
|
* TODO add URL
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function budgeted(DateRequest $request, Budget $budget): JsonResponse
|
public function budgeted(DateRequest $request, Budget $budget): JsonResponse {
|
||||||
{
|
|
||||||
$data = $request->getAll();
|
$data = $request->getAll();
|
||||||
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
|
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||||
$converted = $this->cerSum(array_values($result));
|
$converted = $this->cerSum(array_values($result));
|
||||||
@ -73,8 +73,7 @@ class ShowController extends Controller
|
|||||||
* TODO add URL
|
* TODO add URL
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function spent(DateRequest $request, Budget $budget): JsonResponse
|
public function spent(DateRequest $request, Budget $budget): JsonResponse {
|
||||||
{
|
|
||||||
$data = $request->getAll();
|
$data = $request->getAll();
|
||||||
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
|
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||||
$converted = $this->cerSum(array_values($result));
|
$converted = $this->cerSum(array_values($result));
|
||||||
|
@ -126,6 +126,7 @@ class CorrectOpeningBalanceCurrencies extends Command
|
|||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function setCorrectCurrency(Account $account, TransactionJournal $journal): int
|
private function setCorrectCurrency(Account $account, TransactionJournal $journal): int
|
||||||
|
@ -1,5 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TriggerCreditCalculation.php
|
||||||
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
|
*
|
||||||
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Console\Commands\Correction;
|
namespace FireflyIII\Console\Commands\Correction;
|
||||||
|
@ -75,6 +75,7 @@ class UpdateGroupInformation extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param User $user
|
* @param User $user
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function updateGroupInfo(User $user): void
|
private function updateGroupInfo(User $user): void
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* ShowsFriendlyMessages.php
|
* ShowsFriendlyMessages.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Console\Commands;
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,55 +32,55 @@ trait ShowsFriendlyMessages
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyError(string $message): void
|
public function friendlyError(string $message): void {
|
||||||
{
|
|
||||||
$this->error(sprintf(' [x] %s', trim($message)));
|
$this->error(sprintf(' [x] %s', trim($message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyInfo(string $message): void
|
public function friendlyInfo(string $message): void {
|
||||||
{
|
|
||||||
$this->friendlyNeutral($message);
|
$this->friendlyNeutral($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyNeutral(string $message): void
|
public function friendlyNeutral(string $message): void {
|
||||||
{
|
|
||||||
$this->line(sprintf(' [i] %s', trim($message)));
|
$this->line(sprintf(' [i] %s', trim($message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyLine(string $message): void
|
public function friendlyLine(string $message): void {
|
||||||
{
|
|
||||||
$this->line(sprintf(' %s', trim($message)));
|
$this->line(sprintf(' %s', trim($message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyPositive(string $message): void
|
public function friendlyPositive(string $message): void {
|
||||||
{
|
|
||||||
$this->info(sprintf(' [✓] %s', trim($message)));
|
$this->info(sprintf(' [✓] %s', trim($message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message
|
* @param string $message
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function friendlyWarning(string $message): void
|
public function friendlyWarning(string $message): void {
|
||||||
{
|
|
||||||
$this->warn(sprintf(' [!] %s', trim($message)));
|
$this->warn(sprintf(' [!] %s', trim($message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\BudgetLimit;
|
use FireflyIII\Models\BudgetLimit;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
@ -25,7 +25,6 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
|||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Note;
|
use FireflyIII\Models\Note;
|
||||||
use FireflyIII\Models\TransactionJournalMeta;
|
use FireflyIII\Models\TransactionJournalMeta;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Recurrence;
|
use FireflyIII\Models\Recurrence;
|
||||||
use FireflyIII\Models\RecurrenceMeta;
|
use FireflyIII\Models\RecurrenceMeta;
|
||||||
use FireflyIII\Models\RecurrenceTransactionMeta;
|
use FireflyIII\Models\RecurrenceTransactionMeta;
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Recurrence;
|
use FireflyIII\Models\Recurrence;
|
||||||
use FireflyIII\Models\RecurrenceTransaction;
|
use FireflyIII\Models\RecurrenceTransaction;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
@ -103,6 +102,7 @@ class MigrateRecurrenceType extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function migrateRecurrence(Recurrence $recurrence): void
|
private function migrateRecurrence(Recurrence $recurrence): void
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Location;
|
use FireflyIII\Models\Location;
|
||||||
use FireflyIII\Models\Tag;
|
use FireflyIII\Models\Tag;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Factory\AccountMetaFactory;
|
use FireflyIII\Factory\AccountMetaFactory;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Console\Commands\Upgrade;
|
namespace FireflyIII\Console\Commands\Upgrade;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* Created.php
|
* Created.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||||
|
|
||||||
use FireflyIII\Events\Event;
|
use FireflyIII\Events\Event;
|
||||||
@ -39,8 +41,7 @@ class Created extends Event
|
|||||||
/**
|
/**
|
||||||
* @param BudgetLimit $budgetLimit
|
* @param BudgetLimit $budgetLimit
|
||||||
*/
|
*/
|
||||||
public function __construct(BudgetLimit $budgetLimit)
|
public function __construct(BudgetLimit $budgetLimit) {
|
||||||
{
|
|
||||||
$this->budgetLimit = $budgetLimit;
|
$this->budgetLimit = $budgetLimit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* Created.php
|
* Deleted.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||||
|
|
||||||
use FireflyIII\Events\Event;
|
use FireflyIII\Events\Event;
|
||||||
@ -39,8 +41,7 @@ class Deleted extends Event
|
|||||||
/**
|
/**
|
||||||
* @param BudgetLimit $budgetLimit
|
* @param BudgetLimit $budgetLimit
|
||||||
*/
|
*/
|
||||||
public function __construct(BudgetLimit $budgetLimit)
|
public function __construct(BudgetLimit $budgetLimit) {
|
||||||
{
|
|
||||||
$this->budgetLimit = $budgetLimit;
|
$this->budgetLimit = $budgetLimit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* Created.php
|
* Updated.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||||
|
|
||||||
use FireflyIII\Events\Event;
|
use FireflyIII\Events\Event;
|
||||||
@ -39,8 +41,7 @@ class Updated extends Event
|
|||||||
/**
|
/**
|
||||||
* @param BudgetLimit $budgetLimit
|
* @param BudgetLimit $budgetLimit
|
||||||
*/
|
*/
|
||||||
public function __construct(BudgetLimit $budgetLimit)
|
public function __construct(BudgetLimit $budgetLimit) {
|
||||||
{
|
|
||||||
$this->budgetLimit = $budgetLimit;
|
$this->budgetLimit = $budgetLimit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,6 +416,7 @@ class TransactionJournalFactory
|
|||||||
/**
|
/**
|
||||||
* @param Account|null $sourceAccount
|
* @param Account|null $sourceAccount
|
||||||
* @param Account|null $destinationAccount
|
* @param Account|null $destinationAccount
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function reconciliationSanityCheck(?Account $sourceAccount, ?Account $destinationAccount): array
|
private function reconciliationSanityCheck(?Account $sourceAccount, ?Account $destinationAccount): array
|
||||||
|
@ -58,6 +58,7 @@ interface MessageGeneratorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $webhooks
|
* @param Collection $webhooks
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setWebhooks(Collection $webhooks): void;
|
public function setWebhooks(Collection $webhooks): void;
|
||||||
|
@ -103,6 +103,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Webhook $webhook
|
* @param Webhook $webhook
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
@ -118,6 +119,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
|
|||||||
/**
|
/**
|
||||||
* @param Webhook $webhook
|
* @param Webhook $webhook
|
||||||
* @param Model $model
|
* @param Model $model
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Handlers\Events;
|
namespace FireflyIII\Handlers\Events;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Notifications\User\NewAccessToken;
|
use FireflyIII\Notifications\User\NewAccessToken;
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
@ -42,6 +42,7 @@ class AdminEventHandler
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param InvitationCreated $event
|
* @param InvitationCreated $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function sendInvitationNotification(InvitationCreated $event): void
|
public function sendInvitationNotification(InvitationCreated $event): void
|
||||||
@ -79,6 +80,7 @@ class AdminEventHandler
|
|||||||
* Send new version message to admin.
|
* Send new version message to admin.
|
||||||
*
|
*
|
||||||
* @param NewVersionAvailable $event
|
* @param NewVersionAvailable $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function sendNewVersion(NewVersionAvailable $event): void
|
public function sendNewVersion(NewVersionAvailable $event): void
|
||||||
|
@ -42,6 +42,7 @@ class AutomationHandler
|
|||||||
* Respond to the creation of X journals.
|
* Respond to the creation of X journals.
|
||||||
*
|
*
|
||||||
* @param RequestedReportOnJournals $event
|
* @param RequestedReportOnJournals $event
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function reportJournals(RequestedReportOnJournals $event): void
|
public function reportJournals(RequestedReportOnJournals $event): void
|
||||||
|
@ -38,6 +38,7 @@ class BillEventHandler
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param WarnUserAboutBill $event
|
* @param WarnUserAboutBill $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function warnAboutBill(WarnUserAboutBill $event): void
|
public function warnAboutBill(WarnUserAboutBill $event): void
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* BudgetLimitHandler.php
|
* BudgetLimitHandler.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Handlers\Events\Model;
|
namespace FireflyIII\Handlers\Events\Model;
|
||||||
|
|
||||||
use FireflyIII\Events\Model\BudgetLimit\Created;
|
use FireflyIII\Events\Model\BudgetLimit\Created;
|
||||||
@ -44,20 +46,20 @@ class BudgetLimitHandler
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Created $event
|
* @param Created $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function created(Created $event): void
|
public function created(Created $event): void {
|
||||||
{
|
|
||||||
Log::debug(sprintf('BudgetLimitHandler::created(#%s)', $event->budgetLimit->id));
|
Log::debug(sprintf('BudgetLimitHandler::created(#%s)', $event->budgetLimit->id));
|
||||||
$this->updateAvailableBudget($event->budgetLimit);
|
$this->updateAvailableBudget($event->budgetLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param BudgetLimit $budgetLimit
|
* @param BudgetLimit $budgetLimit
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function updateAvailableBudget(BudgetLimit $budgetLimit): void
|
private function updateAvailableBudget(BudgetLimit $budgetLimit): void {
|
||||||
{
|
|
||||||
Log::debug(sprintf('Now in updateAvailableBudget(#%d)', $budgetLimit->id));
|
Log::debug(sprintf('Now in updateAvailableBudget(#%d)', $budgetLimit->id));
|
||||||
|
|
||||||
// based on the view range of the user (month week quarter etc) the budget limit could
|
// based on the view range of the user (month week quarter etc) the budget limit could
|
||||||
@ -140,10 +142,10 @@ class BudgetLimitHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AvailableBudget $availableBudget
|
* @param AvailableBudget $availableBudget
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function calculateAmount(AvailableBudget $availableBudget): void
|
private function calculateAmount(AvailableBudget $availableBudget): void {
|
||||||
{
|
|
||||||
$repository = app(BudgetLimitRepositoryInterface::class);
|
$repository = app(BudgetLimitRepositoryInterface::class);
|
||||||
$repository->setUser($availableBudget->user);
|
$repository->setUser($availableBudget->user);
|
||||||
$newAmount = '0';
|
$newAmount = '0';
|
||||||
@ -205,10 +207,10 @@ class BudgetLimitHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param BudgetLimit $budgetLimit
|
* @param BudgetLimit $budgetLimit
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getDailyAmount(BudgetLimit $budgetLimit): string
|
private function getDailyAmount(BudgetLimit $budgetLimit): string {
|
||||||
{
|
|
||||||
if (0 === (int)$budgetLimit->id) {
|
if (0 === (int)$budgetLimit->id) {
|
||||||
return '0';
|
return '0';
|
||||||
}
|
}
|
||||||
@ -228,10 +230,10 @@ class BudgetLimitHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Deleted $event
|
* @param Deleted $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function deleted(Deleted $event): void
|
public function deleted(Deleted $event): void {
|
||||||
{
|
|
||||||
Log::debug(sprintf('BudgetLimitHandler::deleted(#%s)', $event->budgetLimit->id));
|
Log::debug(sprintf('BudgetLimitHandler::deleted(#%s)', $event->budgetLimit->id));
|
||||||
$budgetLimit = $event->budgetLimit;
|
$budgetLimit = $event->budgetLimit;
|
||||||
$budgetLimit->id = null;
|
$budgetLimit->id = null;
|
||||||
@ -240,10 +242,10 @@ class BudgetLimitHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Updated $event
|
* @param Updated $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function updated(Updated $event): void
|
public function updated(Updated $event): void {
|
||||||
{
|
|
||||||
Log::debug(sprintf('BudgetLimitHandler::updated(#%s)', $event->budgetLimit->id));
|
Log::debug(sprintf('BudgetLimitHandler::updated(#%s)', $event->budgetLimit->id));
|
||||||
$this->updateAvailableBudget($event->budgetLimit);
|
$this->updateAvailableBudget($event->budgetLimit);
|
||||||
}
|
}
|
||||||
|
@ -329,6 +329,7 @@ class UserEventHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param InvitationCreated $event
|
* @param InvitationCreated $event
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
@ -376,6 +377,7 @@ class UserEventHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ActuallyLoggedIn $event
|
* @param ActuallyLoggedIn $event
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function storeUserIPAddress(ActuallyLoggedIn $event): void
|
public function storeUserIPAddress(ActuallyLoggedIn $event): void
|
||||||
|
@ -38,6 +38,7 @@ trait AttachmentCollection
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameContains(string $name): GroupCollectorInterface
|
public function attachmentNameContains(string $name): GroupCollectorInterface
|
||||||
@ -116,6 +117,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface
|
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface
|
||||||
@ -145,6 +147,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface
|
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface
|
||||||
@ -174,6 +177,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface
|
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface
|
||||||
@ -203,6 +207,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameEnds(string $name): GroupCollectorInterface
|
public function attachmentNameEnds(string $name): GroupCollectorInterface
|
||||||
@ -232,6 +237,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameIs(string $name): GroupCollectorInterface
|
public function attachmentNameIs(string $name): GroupCollectorInterface
|
||||||
@ -258,6 +264,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameIsNot(string $name): GroupCollectorInterface
|
public function attachmentNameIsNot(string $name): GroupCollectorInterface
|
||||||
@ -284,6 +291,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameStarts(string $name): GroupCollectorInterface
|
public function attachmentNameStarts(string $name): GroupCollectorInterface
|
||||||
@ -313,6 +321,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesAre(string $value): GroupCollectorInterface
|
public function attachmentNotesAre(string $value): GroupCollectorInterface
|
||||||
@ -339,6 +348,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesAreNot(string $value): GroupCollectorInterface
|
public function attachmentNotesAreNot(string $value): GroupCollectorInterface
|
||||||
@ -365,6 +375,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesContains(string $value): GroupCollectorInterface
|
public function attachmentNotesContains(string $value): GroupCollectorInterface
|
||||||
@ -391,6 +402,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface
|
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface
|
||||||
@ -417,6 +429,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface
|
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface
|
||||||
@ -443,6 +456,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface
|
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface
|
||||||
@ -469,6 +483,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesEnds(string $value): GroupCollectorInterface
|
public function attachmentNotesEnds(string $value): GroupCollectorInterface
|
||||||
@ -495,6 +510,7 @@ trait AttachmentCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesStarts(string $value): GroupCollectorInterface
|
public function attachmentNotesStarts(string $value): GroupCollectorInterface
|
||||||
|
@ -320,6 +320,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlContains(string $url): GroupCollectorInterface
|
public function externalUrlContains(string $url): GroupCollectorInterface
|
||||||
@ -335,6 +336,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface
|
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface
|
||||||
@ -350,6 +352,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface
|
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface
|
||||||
@ -365,6 +368,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface
|
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface
|
||||||
@ -382,6 +386,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlEnds(string $url): GroupCollectorInterface
|
public function externalUrlEnds(string $url): GroupCollectorInterface
|
||||||
@ -397,6 +402,7 @@ trait MetaCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlStarts(string $url): GroupCollectorInterface
|
public function externalUrlStarts(string $url): GroupCollectorInterface
|
||||||
|
@ -34,6 +34,7 @@ trait TimeCollection
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayAfter(string $day): GroupCollectorInterface
|
public function dayAfter(string $day): GroupCollectorInterface
|
||||||
@ -44,6 +45,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayBefore(string $day): GroupCollectorInterface
|
public function dayBefore(string $day): GroupCollectorInterface
|
||||||
@ -54,6 +56,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayIs(string $day): GroupCollectorInterface
|
public function dayIs(string $day): GroupCollectorInterface
|
||||||
@ -64,6 +67,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayIsNot(string $day): GroupCollectorInterface
|
public function dayIsNot(string $day): GroupCollectorInterface
|
||||||
@ -76,6 +80,7 @@ trait TimeCollection
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||||
@ -118,6 +123,7 @@ trait TimeCollection
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||||
@ -134,6 +140,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface
|
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface
|
||||||
@ -153,6 +160,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayAfter(string $day, string $field): GroupCollectorInterface
|
public function metaDayAfter(string $day, string $field): GroupCollectorInterface
|
||||||
@ -176,6 +184,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayBefore(string $day, string $field): GroupCollectorInterface
|
public function metaDayBefore(string $day, string $field): GroupCollectorInterface
|
||||||
@ -199,6 +208,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayIs(string $day, string $field): GroupCollectorInterface
|
public function metaDayIs(string $day, string $field): GroupCollectorInterface
|
||||||
@ -221,6 +231,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface
|
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface
|
||||||
@ -243,6 +254,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface
|
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface
|
||||||
@ -266,6 +278,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface
|
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface
|
||||||
@ -289,6 +302,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthIs(string $month, string $field): GroupCollectorInterface
|
public function metaMonthIs(string $month, string $field): GroupCollectorInterface
|
||||||
@ -311,6 +325,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface
|
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface
|
||||||
@ -333,6 +348,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearAfter(string $year, string $field): GroupCollectorInterface
|
public function metaYearAfter(string $year, string $field): GroupCollectorInterface
|
||||||
@ -356,6 +372,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearBefore(string $year, string $field): GroupCollectorInterface
|
public function metaYearBefore(string $year, string $field): GroupCollectorInterface
|
||||||
@ -379,6 +396,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearIs(string $year, string $field): GroupCollectorInterface
|
public function metaYearIs(string $year, string $field): GroupCollectorInterface
|
||||||
@ -402,6 +420,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface
|
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface
|
||||||
@ -423,6 +442,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthAfter(string $month): GroupCollectorInterface
|
public function monthAfter(string $month): GroupCollectorInterface
|
||||||
@ -433,6 +453,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthBefore(string $month): GroupCollectorInterface
|
public function monthBefore(string $month): GroupCollectorInterface
|
||||||
@ -443,6 +464,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthIs(string $month): GroupCollectorInterface
|
public function monthIs(string $month): GroupCollectorInterface
|
||||||
@ -453,6 +475,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthIsNot(string $month): GroupCollectorInterface
|
public function monthIsNot(string $month): GroupCollectorInterface
|
||||||
@ -464,6 +487,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayAfter(string $day, string $field): GroupCollectorInterface
|
public function objectDayAfter(string $day, string $field): GroupCollectorInterface
|
||||||
@ -475,6 +499,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayBefore(string $day, string $field): GroupCollectorInterface
|
public function objectDayBefore(string $day, string $field): GroupCollectorInterface
|
||||||
@ -486,6 +511,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayIs(string $day, string $field): GroupCollectorInterface
|
public function objectDayIs(string $day, string $field): GroupCollectorInterface
|
||||||
@ -497,6 +523,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface
|
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface
|
||||||
@ -508,6 +535,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface
|
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface
|
||||||
@ -519,6 +547,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface
|
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface
|
||||||
@ -530,6 +559,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthIs(string $month, string $field): GroupCollectorInterface
|
public function objectMonthIs(string $month, string $field): GroupCollectorInterface
|
||||||
@ -541,6 +571,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface
|
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface
|
||||||
@ -552,6 +583,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearAfter(string $year, string $field): GroupCollectorInterface
|
public function objectYearAfter(string $year, string $field): GroupCollectorInterface
|
||||||
@ -563,6 +595,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearBefore(string $year, string $field): GroupCollectorInterface
|
public function objectYearBefore(string $year, string $field): GroupCollectorInterface
|
||||||
@ -574,6 +607,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearIs(string $year, string $field): GroupCollectorInterface
|
public function objectYearIs(string $year, string $field): GroupCollectorInterface
|
||||||
@ -585,6 +619,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface
|
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface
|
||||||
@ -643,6 +678,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface
|
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface
|
||||||
@ -667,6 +703,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface
|
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface
|
||||||
@ -691,6 +728,7 @@ trait TimeCollection
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
public function setMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||||
@ -720,6 +758,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface
|
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface
|
||||||
@ -733,6 +772,7 @@ trait TimeCollection
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface
|
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface
|
||||||
@ -746,6 +786,7 @@ trait TimeCollection
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||||
@ -800,6 +841,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearAfter(string $year): GroupCollectorInterface
|
public function yearAfter(string $year): GroupCollectorInterface
|
||||||
@ -810,6 +852,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearBefore(string $year): GroupCollectorInterface
|
public function yearBefore(string $year): GroupCollectorInterface
|
||||||
@ -820,6 +863,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearIs(string $year): GroupCollectorInterface
|
public function yearIs(string $year): GroupCollectorInterface
|
||||||
@ -830,6 +874,7 @@ trait TimeCollection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearIsNot(string $year): GroupCollectorInterface
|
public function yearIsNot(string $year): GroupCollectorInterface
|
||||||
|
@ -664,6 +664,7 @@ class GroupCollector implements GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $array
|
* @param array $array
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function convertToStrings(array $array): array
|
private function convertToStrings(array $array): array
|
||||||
@ -772,6 +773,7 @@ class GroupCollector implements GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
private function postFilterCollection(Collection $collection): Collection
|
private function postFilterCollection(Collection $collection): Collection
|
||||||
|
@ -75,120 +75,140 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameContains(string $name): GroupCollectorInterface;
|
public function attachmentNameContains(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface;
|
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface;
|
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface;
|
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameEnds(string $name): GroupCollectorInterface;
|
public function attachmentNameEnds(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameIs(string $name): GroupCollectorInterface;
|
public function attachmentNameIs(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameIsNot(string $name): GroupCollectorInterface;
|
public function attachmentNameIsNot(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNameStarts(string $name): GroupCollectorInterface;
|
public function attachmentNameStarts(string $name): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesAre(string $value): GroupCollectorInterface;
|
public function attachmentNotesAre(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesAreNot(string $value): GroupCollectorInterface;
|
public function attachmentNotesAreNot(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesContains(string $value): GroupCollectorInterface;
|
public function attachmentNotesContains(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface;
|
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface;
|
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface;
|
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesEnds(string $value): GroupCollectorInterface;
|
public function attachmentNotesEnds(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function attachmentNotesStarts(string $value): GroupCollectorInterface;
|
public function attachmentNotesStarts(string $value): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayAfter(string $day): GroupCollectorInterface;
|
public function dayAfter(string $day): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayBefore(string $day): GroupCollectorInterface;
|
public function dayBefore(string $day): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayIs(string $day): GroupCollectorInterface;
|
public function dayIs(string $day): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function dayIsNot(string $day): GroupCollectorInterface;
|
public function dayIsNot(string $day): GroupCollectorInterface;
|
||||||
@ -287,6 +307,7 @@ interface GroupCollectorInterface
|
|||||||
* Exclude a set of categories.
|
* Exclude a set of categories.
|
||||||
*
|
*
|
||||||
* @param Collection $categories
|
* @param Collection $categories
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeCategories(Collection $categories): GroupCollectorInterface;
|
public function excludeCategories(Collection $categories): GroupCollectorInterface;
|
||||||
@ -329,6 +350,7 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeExternalUrl(string $url): GroupCollectorInterface;
|
public function excludeExternalUrl(string $url): GroupCollectorInterface;
|
||||||
@ -373,6 +395,7 @@ interface GroupCollectorInterface
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||||
@ -381,6 +404,7 @@ interface GroupCollectorInterface
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||||
@ -388,6 +412,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface;
|
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface;
|
||||||
@ -433,72 +458,84 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdContains(string $externalId): GroupCollectorInterface;
|
public function externalIdContains(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface;
|
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface;
|
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface;
|
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdEnds(string $externalId): GroupCollectorInterface;
|
public function externalIdEnds(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalIdStarts(string $externalId): GroupCollectorInterface;
|
public function externalIdStarts(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlContains(string $url): GroupCollectorInterface;
|
public function externalUrlContains(string $url): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface;
|
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface;
|
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface;
|
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlEnds(string $url): GroupCollectorInterface;
|
public function externalUrlEnds(string $url): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function externalUrlStarts(string $url): GroupCollectorInterface;
|
public function externalUrlStarts(string $url): GroupCollectorInterface;
|
||||||
@ -588,36 +625,42 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceContains(string $externalId): GroupCollectorInterface;
|
public function internalReferenceContains(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface;
|
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceEnds(string $externalId): GroupCollectorInterface;
|
public function internalReferenceEnds(string $externalId): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $externalId
|
* @param string $externalId
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function internalReferenceStarts(string $externalId): GroupCollectorInterface;
|
public function internalReferenceStarts(string $externalId): GroupCollectorInterface;
|
||||||
@ -639,6 +682,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayAfter(string $day, string $field): GroupCollectorInterface;
|
public function metaDayAfter(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -646,6 +690,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayBefore(string $day, string $field): GroupCollectorInterface;
|
public function metaDayBefore(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -653,6 +698,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayIs(string $day, string $field): GroupCollectorInterface;
|
public function metaDayIs(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -660,6 +706,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface;
|
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -667,6 +714,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface;
|
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -674,6 +722,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface;
|
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -681,6 +730,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthIs(string $month, string $field): GroupCollectorInterface;
|
public function metaMonthIs(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -688,6 +738,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -695,6 +746,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearAfter(string $year, string $field): GroupCollectorInterface;
|
public function metaYearAfter(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -702,6 +754,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearBefore(string $year, string $field): GroupCollectorInterface;
|
public function metaYearBefore(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -709,6 +762,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearIs(string $year, string $field): GroupCollectorInterface;
|
public function metaYearIs(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -716,30 +770,35 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface;
|
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthAfter(string $month): GroupCollectorInterface;
|
public function monthAfter(string $month): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthBefore(string $month): GroupCollectorInterface;
|
public function monthBefore(string $month): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthIs(string $month): GroupCollectorInterface;
|
public function monthIs(string $month): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function monthIsNot(string $month): GroupCollectorInterface;
|
public function monthIsNot(string $month): GroupCollectorInterface;
|
||||||
@ -767,6 +826,7 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function notesDontStartWith(string $value): GroupCollectorInterface;
|
public function notesDontStartWith(string $value): GroupCollectorInterface;
|
||||||
@ -802,6 +862,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayAfter(string $day, string $field): GroupCollectorInterface;
|
public function objectDayAfter(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -809,6 +870,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayBefore(string $day, string $field): GroupCollectorInterface;
|
public function objectDayBefore(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -816,6 +878,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayIs(string $day, string $field): GroupCollectorInterface;
|
public function objectDayIs(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -823,6 +886,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $day
|
* @param string $day
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface;
|
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface;
|
||||||
@ -830,6 +894,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface;
|
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -837,6 +902,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface;
|
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -844,6 +910,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthIs(string $month, string $field): GroupCollectorInterface;
|
public function objectMonthIs(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -851,6 +918,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $month
|
* @param string $month
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
||||||
@ -858,6 +926,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearAfter(string $year, string $field): GroupCollectorInterface;
|
public function objectYearAfter(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -865,6 +934,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearBefore(string $year, string $field): GroupCollectorInterface;
|
public function objectYearBefore(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -872,6 +942,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearIs(string $year, string $field): GroupCollectorInterface;
|
public function objectYearIs(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -879,6 +950,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface;
|
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface;
|
||||||
@ -1011,6 +1083,7 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $url
|
* @param string $url
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setExternalUrl(string $url): GroupCollectorInterface;
|
public function setExternalUrl(string $url): GroupCollectorInterface;
|
||||||
@ -1065,6 +1138,7 @@ interface GroupCollectorInterface
|
|||||||
*
|
*
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface;
|
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface;
|
||||||
@ -1074,6 +1148,7 @@ interface GroupCollectorInterface
|
|||||||
*
|
*
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface;
|
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface;
|
||||||
@ -1101,6 +1176,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface;
|
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface;
|
||||||
@ -1108,6 +1184,7 @@ interface GroupCollectorInterface
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface;
|
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface;
|
||||||
@ -1116,6 +1193,7 @@ interface GroupCollectorInterface
|
|||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||||
@ -1159,6 +1237,7 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sepaCT
|
* @param string $sepaCT
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function setSepaCT(string $sepaCT): GroupCollectorInterface;
|
public function setSepaCT(string $sepaCT): GroupCollectorInterface;
|
||||||
@ -1332,6 +1411,7 @@ interface GroupCollectorInterface
|
|||||||
* Transaction must have meta date field X.
|
* Transaction must have meta date field X.
|
||||||
*
|
*
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function withMetaDate(string $field): GroupCollectorInterface;
|
public function withMetaDate(string $field): GroupCollectorInterface;
|
||||||
@ -1397,24 +1477,28 @@ interface GroupCollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearAfter(string $year): GroupCollectorInterface;
|
public function yearAfter(string $year): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearBefore(string $year): GroupCollectorInterface;
|
public function yearBefore(string $year): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearIs(string $year): GroupCollectorInterface;
|
public function yearIs(string $year): GroupCollectorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $year
|
* @param string $year
|
||||||
|
*
|
||||||
* @return GroupCollectorInterface
|
* @return GroupCollectorInterface
|
||||||
*/
|
*/
|
||||||
public function yearIsNot(string $year): GroupCollectorInterface;
|
public function yearIsNot(string $year): GroupCollectorInterface;
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Helpers\Fiscal;
|
namespace FireflyIII\Helpers\Fiscal;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ interface NetWorthInterface
|
|||||||
*
|
*
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers\Admin;
|
namespace FireflyIII\Http\Controllers\Admin;
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||||
use FireflyIII\Http\Requests\ConfigurationRequest;
|
use FireflyIII\Http\Requests\ConfigurationRequest;
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Controllers\Admin;
|
namespace FireflyIII\Http\Controllers\Admin;
|
||||||
|
|
||||||
use FireflyIII\Events\AdminRequestedTestMessage;
|
use FireflyIII\Events\AdminRequestedTestMessage;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||||
use FireflyIII\Support\Facades\FireflyConfig;
|
use FireflyIII\Support\Facades\FireflyConfig;
|
||||||
@ -84,6 +83,7 @@ class HomeController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function notifications(Request $request): RedirectResponse
|
public function notifications(Request $request): RedirectResponse
|
||||||
|
@ -89,6 +89,7 @@ class UserController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param InvitedUser $invitedUser
|
* @param InvitedUser $invitedUser
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function deleteInvite(InvitedUser $invitedUser): JsonResponse
|
public function deleteInvite(InvitedUser $invitedUser): JsonResponse
|
||||||
@ -192,6 +193,7 @@ class UserController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param InviteUserFormRequest $request
|
* @param InviteUserFormRequest $request
|
||||||
|
*
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function invite(InviteUserFormRequest $request): RedirectResponse
|
public function invite(InviteUserFormRequest $request): RedirectResponse
|
||||||
|
@ -35,7 +35,6 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use JsonException;
|
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
|
@ -517,6 +517,7 @@ class AccountController extends Controller
|
|||||||
*
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Controllers\Chart;
|
namespace FireflyIII\Http\Controllers\Chart;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||||
use FireflyIII\Helpers\Report\NetWorthInterface;
|
use FireflyIII\Helpers\Report\NetWorthInterface;
|
||||||
|
@ -208,6 +208,7 @@ class CurrencyController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
@ -300,6 +301,7 @@ class CurrencyController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function enableCurrency(Request $request): JsonResponse
|
public function enableCurrency(Request $request): JsonResponse
|
||||||
|
@ -32,8 +32,6 @@ use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
|||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RecurrenceController
|
* Class RecurrenceController
|
||||||
|
@ -1,5 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TriggerController.php
|
||||||
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
|
*
|
||||||
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
/*
|
/*
|
||||||
* TriggerController.php
|
* TriggerController.php
|
||||||
@ -41,6 +62,7 @@ class TriggerController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
* @param TriggerRecurrenceRequest $request
|
* @param TriggerRecurrenceRequest $request
|
||||||
|
*
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse
|
public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse
|
||||||
|
@ -45,8 +45,8 @@ class BillController extends Controller
|
|||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function overview(Collection $accounts, Carbon $start, Carbon $end)
|
public function overview(Collection $accounts, Carbon $start, Carbon $end) // chart properties for cache:
|
||||||
{ // chart properties for cache:
|
{
|
||||||
$cache = new CacheProperties();
|
$cache = new CacheProperties();
|
||||||
$cache->addProperty($start);
|
$cache->addProperty($start);
|
||||||
$cache->addProperty($end);
|
$cache->addProperty($end);
|
||||||
|
@ -241,6 +241,7 @@ class CreateController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function duplicate(Request $request): JsonResponse
|
public function duplicate(Request $request): JsonResponse
|
||||||
|
@ -138,6 +138,7 @@ class InstallController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param string $command
|
* @param string $command
|
||||||
* @param array $args
|
* @param array $args
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
|
@ -155,6 +155,7 @@ class LinkController extends Controller
|
|||||||
* Switch link from A <> B to B <> A.
|
* Switch link from A <> B to B <> A.
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return RedirectResponse|Redirector
|
* @return RedirectResponse|Redirector
|
||||||
*/
|
*/
|
||||||
public function switchLink(Request $request)
|
public function switchLink(Request $request)
|
||||||
|
@ -39,6 +39,7 @@ class AcceptHeaders
|
|||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param callable $next
|
* @param callable $next
|
||||||
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
* @throws BadHttpHeaderException
|
* @throws BadHttpHeaderException
|
||||||
*/
|
*/
|
||||||
@ -78,6 +79,7 @@ class AcceptHeaders
|
|||||||
/**
|
/**
|
||||||
* @param string $content
|
* @param string $content
|
||||||
* @param array $accepted
|
* @param array $accepted
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function acceptsHeader(string $content, array $accepted): bool
|
private function acceptsHeader(string $content, array $accepted): bool
|
||||||
|
@ -121,6 +121,7 @@ class Authenticate
|
|||||||
/**
|
/**
|
||||||
* @param User|null $user
|
* @param User|null $user
|
||||||
* @param array $guards
|
* @param array $guards
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws AuthenticationException
|
* @throws AuthenticationException
|
||||||
*/
|
*/
|
||||||
|
@ -86,6 +86,7 @@ class RuleFormRequest extends FormRequest
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $array
|
* @param array $array
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function replaceAmountTrigger(array $array): array
|
public static function replaceAmountTrigger(array $array): array
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* TriggerRecurrenceRequest.php
|
* TriggerRecurrenceRequest.php
|
||||||
* Copyright (c) 2022 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
*
|
*
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Http\Requests;
|
namespace FireflyIII\Http\Requests;
|
||||||
|
|
||||||
use FireflyIII\Support\Request\ChecksLogin;
|
use FireflyIII\Support\Request\ChecksLogin;
|
||||||
@ -40,8 +42,7 @@ class TriggerRecurrenceRequest extends FormRequest
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getAll(): array
|
public function getAll(): array {
|
||||||
{
|
|
||||||
return [
|
return [
|
||||||
'date' => $this->getCarbonDate('date'),
|
'date' => $this->getCarbonDate('date'),
|
||||||
];
|
];
|
||||||
@ -52,8 +53,7 @@ class TriggerRecurrenceRequest extends FormRequest
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function rules(): array
|
public function rules(): array {
|
||||||
{
|
|
||||||
return [
|
return [
|
||||||
'date' => 'required|date',
|
'date' => 'required|date',
|
||||||
];
|
];
|
||||||
|
@ -314,6 +314,7 @@ class CreateAutoBudgetLimits implements ShouldQueue
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param AutoBudget $autoBudget
|
* @param AutoBudget $autoBudget
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function createAdjustedLimit(AutoBudget $autoBudget): void
|
private function createAdjustedLimit(AutoBudget $autoBudget): void
|
||||||
|
@ -94,6 +94,7 @@ class DownloadExchangeRates implements ShouldQueue
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
*/
|
*/
|
||||||
@ -128,6 +129,7 @@ class DownloadExchangeRates implements ShouldQueue
|
|||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param array $rates
|
* @param array $rates
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function saveRates(TransactionCurrency $currency, Carbon $date, array $rates): void
|
private function saveRates(TransactionCurrency $currency, Carbon $date, array $rates): void
|
||||||
@ -145,6 +147,7 @@ class DownloadExchangeRates implements ShouldQueue
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $code
|
* @param string $code
|
||||||
|
*
|
||||||
* @return TransactionCurrency|null
|
* @return TransactionCurrency|null
|
||||||
*/
|
*/
|
||||||
private function getCurrency(string $code): ?TransactionCurrency
|
private function getCurrency(string $code): ?TransactionCurrency
|
||||||
@ -177,6 +180,7 @@ class DownloadExchangeRates implements ShouldQueue
|
|||||||
* @param TransactionCurrency $to
|
* @param TransactionCurrency $to
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param float $rate
|
* @param float $rate
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function saveRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date, float $rate): void
|
private function saveRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date, float $rate): void
|
||||||
|
@ -97,6 +97,7 @@ class WarnAboutBills implements ShouldQueue
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function hasDateFields(Bill $bill): bool
|
private function hasDateFields(Bill $bill): bool
|
||||||
@ -115,6 +116,7 @@ class WarnAboutBills implements ShouldQueue
|
|||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function needsWarning(Bill $bill, string $field): bool
|
private function needsWarning(Bill $bill, string $field): bool
|
||||||
@ -134,6 +136,7 @@ class WarnAboutBills implements ShouldQueue
|
|||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function getDiff(Bill $bill, string $field): int
|
private function getDiff(Bill $bill, string $field): int
|
||||||
@ -146,6 +149,7 @@ class WarnAboutBills implements ShouldQueue
|
|||||||
/**
|
/**
|
||||||
* @param Bill $bill
|
* @param Bill $bill
|
||||||
* @param string $field
|
* @param string $field
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function sendWarning(Bill $bill, string $field): void
|
private function sendWarning(Bill $bill, string $field): void
|
||||||
|
@ -52,6 +52,7 @@ class TestNotification extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -65,6 +66,7 @@ class TestNotification extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -78,6 +80,7 @@ class TestNotification extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -89,6 +92,7 @@ class TestNotification extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -53,6 +53,7 @@ class UserInvitation extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -66,6 +67,7 @@ class UserInvitation extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -79,6 +81,7 @@ class UserInvitation extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -92,6 +95,7 @@ class UserInvitation extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -53,6 +53,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -66,6 +67,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -79,6 +81,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -90,6 +93,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -53,6 +53,7 @@ class VersionCheckResult extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -66,6 +67,7 @@ class VersionCheckResult extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -79,6 +81,7 @@ class VersionCheckResult extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -93,6 +96,7 @@ class VersionCheckResult extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -57,6 +57,7 @@ class BillReminder extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -70,6 +71,7 @@ class BillReminder extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -88,6 +90,7 @@ class BillReminder extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -110,6 +113,7 @@ class BillReminder extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -49,6 +49,7 @@ class NewAccessToken extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -62,6 +63,7 @@ class NewAccessToken extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -75,6 +77,7 @@ class NewAccessToken extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -86,6 +89,7 @@ class NewAccessToken extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -51,6 +51,7 @@ class TransactionCreation extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -64,6 +65,7 @@ class TransactionCreation extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -77,6 +79,7 @@ class TransactionCreation extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -54,6 +54,7 @@ class UserLogin extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -67,6 +68,7 @@ class UserLogin extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -92,6 +94,7 @@ class UserLogin extends Notification
|
|||||||
* Get the Slack representation of the notification.
|
* Get the Slack representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return SlackMessage
|
* @return SlackMessage
|
||||||
*/
|
*/
|
||||||
public function toSlack($notifiable)
|
public function toSlack($notifiable)
|
||||||
@ -114,6 +117,7 @@ class UserLogin extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -51,6 +51,7 @@ class UserNewPassword extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -64,6 +65,7 @@ class UserNewPassword extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -77,6 +79,7 @@ class UserNewPassword extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -48,6 +48,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the array representation of the notification.
|
* Get the array representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function toArray($notifiable)
|
public function toArray($notifiable)
|
||||||
@ -61,6 +62,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the mail representation of the notification.
|
* Get the mail representation of the notification.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return MailMessage
|
* @return MailMessage
|
||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
@ -74,6 +76,7 @@ class UserRegistration extends Notification
|
|||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
*
|
*
|
||||||
* @param mixed $notifiable
|
* @param mixed $notifiable
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function via($notifiable)
|
public function via($notifiable)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* AccountRepository.php
|
* AccountRepository.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Repositories\Administration\Account;
|
namespace FireflyIII\Repositories\Administration\Account;
|
||||||
|
|
||||||
use FireflyIII\Support\Repositories\Administration\AdministrationTrait;
|
use FireflyIII\Support\Repositories\Administration\AdministrationTrait;
|
||||||
@ -36,8 +38,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public function searchAccount(string $query, array $types, int $limit): Collection
|
public function searchAccount(string $query, array $types, int $limit): Collection {
|
||||||
{
|
|
||||||
// search by group, not by user
|
// search by group, not by user
|
||||||
$dbQuery = $this->userGroup->accounts()
|
$dbQuery = $this->userGroup->accounts()
|
||||||
->where('active', true)
|
->where('active', true)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
/*
|
/*
|
||||||
* AccountRepositoryInterface.php
|
* AccountRepositoryInterface.php
|
||||||
* Copyright (c) 2023 james@firefly-iii.org
|
* Copyright (c) 2023 james@firefly-iii.org
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Repositories\Administration\Account;
|
namespace FireflyIII\Repositories\Administration\Account;
|
||||||
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
@ -35,12 +35,14 @@ interface ALERepositoryInterface
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Model $model
|
* @param Model $model
|
||||||
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function getForObject(Model $model): Collection;
|
public function getForObject(Model $model): Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
*
|
||||||
* @return AuditLogEntry
|
* @return AuditLogEntry
|
||||||
*/
|
*/
|
||||||
public function store(array $data): AuditLogEntry;
|
public function store(array $data): AuditLogEntry;
|
||||||
|
@ -282,6 +282,7 @@ interface BillRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function sumPaidInRange(Carbon $start, Carbon $end): array;
|
public function sumPaidInRange(Carbon $start, Carbon $end): array;
|
||||||
@ -291,6 +292,7 @@ interface BillRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function sumUnpaidInRange(Carbon $start, Carbon $end): array;
|
public function sumUnpaidInRange(Carbon $start, Carbon $end): array;
|
||||||
|
@ -171,6 +171,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
* @param BudgetLimit $limit
|
* @param BudgetLimit $limit
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function daysInOverlap(BudgetLimit $limit, Carbon $start, Carbon $end): int
|
private function daysInOverlap(BudgetLimit $limit, Carbon $start, Carbon $end): int
|
||||||
@ -374,6 +375,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
* @param string $text
|
* @param string $text
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function setNoteText(Budget $budget, string $text): void
|
private function setNoteText(Budget $budget, string $text): void
|
||||||
@ -405,6 +407,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
|
@ -57,6 +57,7 @@ interface BudgetRepositoryInterface
|
|||||||
*
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function budgetedInPeriod(Carbon $start, Carbon $end): array;
|
public function budgetedInPeriod(Carbon $start, Carbon $end): array;
|
||||||
@ -67,6 +68,7 @@ interface BudgetRepositoryInterface
|
|||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function budgetedInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array;
|
public function budgetedInPeriodForBudget(Budget $budget, Carbon $start, Carbon $end): array;
|
||||||
@ -173,6 +175,7 @@ interface BudgetRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Budget $budget
|
* @param Budget $budget
|
||||||
|
*
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getNoteText(Budget $budget): ?string;
|
public function getNoteText(Budget $budget): ?string;
|
||||||
|
@ -288,6 +288,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
|||||||
* @param Collection|null $accounts
|
* @param Collection|null $accounts
|
||||||
* @param Collection|null $budgets
|
* @param Collection|null $budgets
|
||||||
* @param TransactionCurrency|null $currency
|
* @param TransactionCurrency|null $currency
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
@ -473,6 +473,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
|||||||
* @param TransactionCurrency $toCurrency
|
* @param TransactionCurrency $toCurrency
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param float $rate
|
* @param float $rate
|
||||||
|
*
|
||||||
* @return CurrencyExchangeRate
|
* @return CurrencyExchangeRate
|
||||||
*/
|
*/
|
||||||
public function setExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date, float $rate): CurrencyExchangeRate
|
public function setExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date, float $rate): CurrencyExchangeRate
|
||||||
|
@ -226,6 +226,7 @@ interface CurrencyRepositoryInterface
|
|||||||
* @param TransactionCurrency $toCurrency
|
* @param TransactionCurrency $toCurrency
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param float $rate
|
* @param float $rate
|
||||||
|
*
|
||||||
* @return CurrencyExchangeRate
|
* @return CurrencyExchangeRate
|
||||||
*/
|
*/
|
||||||
public function setExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date, float $rate): CurrencyExchangeRate;
|
public function setExchangeRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date, float $rate): CurrencyExchangeRate;
|
||||||
|
@ -172,6 +172,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param TransactionJournal $one
|
* @param TransactionJournal $one
|
||||||
* @param TransactionJournal $two
|
* @param TransactionJournal $two
|
||||||
|
*
|
||||||
* @return TransactionJournalLink|null
|
* @return TransactionJournalLink|null
|
||||||
*/
|
*/
|
||||||
public function getLink(TransactionJournal $one, TransactionJournal $two): ?TransactionJournalLink
|
public function getLink(TransactionJournal $one, TransactionJournal $two): ?TransactionJournalLink
|
||||||
|
@ -47,6 +47,7 @@ trait ModifiesPiggyBanks
|
|||||||
* @param PiggyBankRepetition $repetition
|
* @param PiggyBankRepetition $repetition
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void
|
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void
|
||||||
@ -66,6 +67,7 @@ trait ModifiesPiggyBanks
|
|||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal|null $journal
|
* @param TransactionJournal|null $journal
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool
|
public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool
|
||||||
@ -87,6 +89,7 @@ trait ModifiesPiggyBanks
|
|||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal|null $journal
|
* @param TransactionJournal|null $journal
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool
|
public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool
|
||||||
|
@ -41,6 +41,7 @@ interface PiggyBankRepositoryInterface
|
|||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal|null $journal
|
* @param TransactionJournal|null $journal
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool;
|
public function addAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool;
|
||||||
@ -49,6 +50,7 @@ interface PiggyBankRepositoryInterface
|
|||||||
* @param PiggyBankRepetition $repetition
|
* @param PiggyBankRepetition $repetition
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal $journal
|
* @param TransactionJournal $journal
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void;
|
public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void;
|
||||||
@ -203,6 +205,7 @@ interface PiggyBankRepositoryInterface
|
|||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
* @param string $amount
|
* @param string $amount
|
||||||
* @param TransactionJournal|null $journal
|
* @param TransactionJournal|null $journal
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool;
|
public function removeAmount(PiggyBank $piggyBank, string $amount, ?TransactionJournal $journal = null): bool;
|
||||||
|
@ -42,6 +42,7 @@ interface RecurringRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function createdPreviously(Recurrence $recurrence, Carbon $date): bool;
|
public function createdPreviously(Recurrence $recurrence, Carbon $date): bool;
|
||||||
|
@ -104,6 +104,7 @@ interface UserRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param InvitedUser $invite
|
* @param InvitedUser $invite
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function deleteInvite(InvitedUser $invite): void;
|
public function deleteInvite(InvitedUser $invite): void;
|
||||||
@ -158,6 +159,7 @@ interface UserRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @param int $groupId
|
* @param int $groupId
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getRolesInGroup(User $user, int $groupId): array;
|
public function getRolesInGroup(User $user, int $groupId): array;
|
||||||
@ -182,12 +184,14 @@ interface UserRepositoryInterface
|
|||||||
/**
|
/**
|
||||||
* @param User|Authenticatable|null $user
|
* @param User|Authenticatable|null $user
|
||||||
* @param string $email
|
* @param string $email
|
||||||
|
*
|
||||||
* @return InvitedUser
|
* @return InvitedUser
|
||||||
*/
|
*/
|
||||||
public function inviteUser(User | Authenticatable | null $user, string $email): InvitedUser;
|
public function inviteUser(User | Authenticatable | null $user, string $email): InvitedUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $code
|
* @param string $code
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function redeemCode(string $code): void;
|
public function redeemCode(string $code): void;
|
||||||
@ -245,6 +249,7 @@ interface UserRepositoryInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $code
|
* @param string $code
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function validateInviteCode(string $code): bool;
|
public function validateInviteCode(string $code): bool;
|
||||||
|
@ -403,6 +403,7 @@ trait AccountServiceTrait
|
|||||||
* @param string $direction
|
* @param string $direction
|
||||||
* @param string $openingBalance
|
* @param string $openingBalance
|
||||||
* @param Carbon $openingBalanceDate
|
* @param Carbon $openingBalanceDate
|
||||||
|
*
|
||||||
* @return TransactionGroup
|
* @return TransactionGroup
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws JsonException
|
* @throws JsonException
|
||||||
|
@ -210,6 +210,7 @@ class CreditRecalculateService
|
|||||||
* @param string $direction
|
* @param string $direction
|
||||||
* @param Transaction $transaction
|
* @param Transaction $transaction
|
||||||
* @param string $leftOfDebt
|
* @param string $leftOfDebt
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function processTransaction(Account $account, string $direction, Transaction $transaction, string $leftOfDebt): string
|
private function processTransaction(Account $account, string $direction, Transaction $transaction, string $leftOfDebt): string
|
||||||
|
@ -244,6 +244,7 @@ trait JournalServiceTrait
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $types
|
* @param array $types
|
||||||
|
*
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
private function getCreatableType(array $types): ?string
|
private function getCreatableType(array $types): ?string
|
||||||
|
@ -243,6 +243,7 @@ class AccountUpdateService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $array
|
* @param array $array
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function getTypeIds(array $array): array
|
private function getTypeIds(array $array): array
|
||||||
|
@ -33,6 +33,7 @@ use FireflyIII\Services\Internal\Support\RecurringTransactionTrait;
|
|||||||
use FireflyIII\Services\Internal\Support\TransactionTypeTrait;
|
use FireflyIII\Services\Internal\Support\TransactionTypeTrait;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use JsonException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RecurrenceUpdateService
|
* Class RecurrenceUpdateService
|
||||||
@ -212,8 +213,9 @@ class RecurrenceUpdateService
|
|||||||
*
|
*
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
* @param array $transactions
|
* @param array $transactions
|
||||||
|
*
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
* @throws \JsonException
|
* @throws JsonException
|
||||||
*/
|
*/
|
||||||
private function updateTransactions(Recurrence $recurrence, array $transactions): void
|
private function updateTransactions(Recurrence $recurrence, array $transactions): void
|
||||||
{
|
{
|
||||||
@ -273,6 +275,7 @@ class RecurrenceUpdateService
|
|||||||
/**
|
/**
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
* @param array $combination
|
* @param array $combination
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function updateCombination(Recurrence $recurrence, array $combination): void
|
private function updateCombination(Recurrence $recurrence, array $combination): void
|
||||||
@ -354,6 +357,7 @@ class RecurrenceUpdateService
|
|||||||
/**
|
/**
|
||||||
* @param Recurrence $recurrence
|
* @param Recurrence $recurrence
|
||||||
* @param int $transactionId
|
* @param int $transactionId
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function deleteTransaction(Recurrence $recurrence, int $transactionId): void
|
private function deleteTransaction(Recurrence $recurrence, int $transactionId): void
|
||||||
|
@ -49,6 +49,7 @@ class RemoteUserGuard implements Guard
|
|||||||
*
|
*
|
||||||
* @param UserProvider $provider
|
* @param UserProvider $provider
|
||||||
* @param Application $app
|
* @param Application $app
|
||||||
|
*
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Calculator.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli https://github.com/tonicospinelli
|
* Copyright (c) 2023 Antonio Spinelli https://github.com/tonicospinelli
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,10 +21,13 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar;
|
namespace FireflyIII\Support\Calendar;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Support\Calendar\Exceptions\IntervalException;
|
use FireflyIII\Support\Calendar\Exceptions\IntervalException;
|
||||||
|
use SplObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Calculator
|
* Class Calculator
|
||||||
@ -32,62 +35,18 @@ use FireflyIII\Support\Calendar\Exceptions\IntervalException;
|
|||||||
class Calculator
|
class Calculator
|
||||||
{
|
{
|
||||||
public const DEFAULT_INTERVAL = 1;
|
public const DEFAULT_INTERVAL = 1;
|
||||||
|
private static ?SplObjectStorage $intervalMap = null;
|
||||||
private static array $intervals = [];
|
private static array $intervals = [];
|
||||||
private static ?\SplObjectStorage $intervalMap = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \SplObjectStorage
|
|
||||||
*/
|
|
||||||
private static function loadIntervalMap(): \SplObjectStorage
|
|
||||||
{
|
|
||||||
if (self::$intervalMap != null) {
|
|
||||||
return self::$intervalMap;
|
|
||||||
}
|
|
||||||
self::$intervalMap = new \SplObjectStorage();
|
|
||||||
foreach (Periodicity::cases() as $interval) {
|
|
||||||
$periodicityClass = __NAMESPACE__ . "\\Periodicity\\{$interval->name}";
|
|
||||||
self::$intervals[] = $interval->name;
|
|
||||||
self::$intervalMap->attach($interval, new $periodicityClass());
|
|
||||||
}
|
|
||||||
return self::$intervalMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Periodicity $periodicity
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private static function containsInterval(Periodicity $periodicity): bool
|
|
||||||
{
|
|
||||||
return self::loadIntervalMap()->contains($periodicity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Periodicity $periodicity
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function isAvailablePeriodicity(Periodicity $periodicity): bool
|
|
||||||
{
|
|
||||||
return self::containsInterval($periodicity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $skip
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
private function skipInterval(int $skip): int
|
|
||||||
{
|
|
||||||
return self::DEFAULT_INTERVAL + $skip;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Carbon $epoch
|
* @param Carbon $epoch
|
||||||
* @param Periodicity $periodicity
|
* @param Periodicity $periodicity
|
||||||
* @param int $skipInterval
|
* @param int $skipInterval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
* @throws IntervalException
|
* @throws IntervalException
|
||||||
*/
|
*/
|
||||||
public function nextDateByInterval(Carbon $epoch, Periodicity $periodicity, int $skipInterval = 0): Carbon
|
public function nextDateByInterval(Carbon $epoch, Periodicity $periodicity, int $skipInterval = 0): Carbon {
|
||||||
{
|
|
||||||
if (!self::isAvailablePeriodicity($periodicity)) {
|
if (!self::isAvailablePeriodicity($periodicity)) {
|
||||||
throw IntervalException::unavailable($periodicity, self::$intervals);
|
throw IntervalException::unavailable($periodicity, self::$intervals);
|
||||||
}
|
}
|
||||||
@ -98,4 +57,47 @@ class Calculator
|
|||||||
return $periodicity->nextDate($epoch->clone(), $interval);
|
return $periodicity->nextDate($epoch->clone(), $interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Periodicity $periodicity
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isAvailablePeriodicity(Periodicity $periodicity): bool {
|
||||||
|
return self::containsInterval($periodicity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Periodicity $periodicity
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private static function containsInterval(Periodicity $periodicity): bool {
|
||||||
|
return self::loadIntervalMap()->contains($periodicity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return SplObjectStorage
|
||||||
|
*/
|
||||||
|
private static function loadIntervalMap(): SplObjectStorage {
|
||||||
|
if (self::$intervalMap != null) {
|
||||||
|
return self::$intervalMap;
|
||||||
|
}
|
||||||
|
self::$intervalMap = new SplObjectStorage();
|
||||||
|
foreach (Periodicity::cases() as $interval) {
|
||||||
|
$periodicityClass = __NAMESPACE__ . "\\Periodicity\\{$interval->name}";
|
||||||
|
self::$intervals[] = $interval->name;
|
||||||
|
self::$intervalMap->attach($interval, new $periodicityClass());
|
||||||
|
}
|
||||||
|
return self::$intervalMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $skip
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
private function skipInterval(int $skip): int {
|
||||||
|
return self::DEFAULT_INTERVAL + $skip;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* IntervalException.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli https://github.com/tonicospinelli
|
* Copyright (c) 2023 Antonio Spinelli https://github.com/tonicospinelli
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,32 +21,36 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Exceptions;
|
namespace FireflyIII\Support\Calendar\Exceptions;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
use FireflyIII\Support\Calendar\Periodicity;
|
use FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IntervalException
|
* Class IntervalException
|
||||||
*/
|
*/
|
||||||
final class IntervalException extends \Exception
|
final class IntervalException extends Exception
|
||||||
{
|
{
|
||||||
protected $message = 'The periodicity %s is unknown. Choose one of available periodicity: %s';
|
|
||||||
|
|
||||||
public readonly Periodicity $periodicity;
|
|
||||||
public readonly array $availableIntervals;
|
public readonly array $availableIntervals;
|
||||||
|
public readonly Periodicity $periodicity;
|
||||||
|
protected $message = 'The periodicity %s is unknown. Choose one of available periodicity: %s';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Periodicity $periodicity
|
* @param Periodicity $periodicity
|
||||||
* @param array $intervals
|
* @param array $intervals
|
||||||
* @param int $code
|
* @param int $code
|
||||||
* @param \Throwable|null $previous
|
* @param Throwable|null $previous
|
||||||
|
*
|
||||||
* @return IntervalException
|
* @return IntervalException
|
||||||
*/
|
*/
|
||||||
public static function unavailable(
|
public static function unavailable(
|
||||||
Periodicity $periodicity,
|
Periodicity $periodicity,
|
||||||
array $intervals,
|
array $intervals,
|
||||||
int $code = 0,
|
int $code = 0,
|
||||||
?\Throwable $previous = null
|
?Throwable $previous = null
|
||||||
): IntervalException {
|
): IntervalException {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
'The periodicity %s is unknown. Choose one of available periodicity: %s',
|
'The periodicity %s is unknown. Choose one of available periodicity: %s',
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Periodicity.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar;
|
namespace FireflyIII\Support\Calendar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Bimonthly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Daily.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -33,10 +35,10 @@ final class Daily extends Interval
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param int $interval
|
* @param int $interval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*/
|
*/
|
||||||
public function nextDate(Carbon $date, int $interval = 1): Carbon
|
public function nextDate(Carbon $date, int $interval = 1): Carbon {
|
||||||
{
|
|
||||||
return ($date->clone())->addDays($this->skip($interval));
|
return ($date->clone())->addDays($this->skip($interval));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Fortnightly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* HalfYearly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Interspacable.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -33,6 +35,7 @@ interface Interspacable
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param int $interval
|
* @param int $interval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*/
|
*/
|
||||||
public function nextDate(Carbon $date, int $interval = 1): Carbon;
|
public function nextDate(Carbon $date, int $interval = 1): Carbon;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Interval.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,10 +34,10 @@ abstract class Interval implements Interspacable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $skip
|
* @param int $skip
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function skip(int $skip): int
|
public function skip(int $skip): int {
|
||||||
{
|
|
||||||
return static::INTERVAL * $skip;
|
return static::INTERVAL * $skip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Monthly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -33,10 +35,10 @@ class Monthly extends Interval
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param int $interval
|
* @param int $interval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*/
|
*/
|
||||||
public function nextDate(Carbon $date, int $interval = 1): Carbon
|
public function nextDate(Carbon $date, int $interval = 1): Carbon {
|
||||||
{
|
|
||||||
return ($date->clone())->addMonthsNoOverflow($this->skip($interval));
|
return ($date->clone())->addMonthsNoOverflow($this->skip($interval));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Quarterly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Weekly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -33,10 +35,10 @@ class Weekly extends Interval
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param int $interval
|
* @param int $interval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*/
|
*/
|
||||||
public function nextDate(Carbon $date, int $interval = 1): Carbon
|
public function nextDate(Carbon $date, int $interval = 1): Carbon {
|
||||||
{
|
|
||||||
return ($date->clone())->addWeeks($this->skip($interval));
|
return ($date->clone())->addWeeks($this->skip($interval));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
|
* Yearly.php
|
||||||
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
* Copyright (c) 2023 Antonio Spinelli <https://github.com/tonicospinelli>
|
||||||
*
|
*
|
||||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||||
@ -21,6 +21,8 @@ declare(strict_types=1);
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Support\Calendar\Periodicity;
|
namespace FireflyIII\Support\Calendar\Periodicity;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
@ -33,10 +35,10 @@ final class Yearly extends Interval
|
|||||||
/**
|
/**
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
* @param int $interval
|
* @param int $interval
|
||||||
|
*
|
||||||
* @return Carbon
|
* @return Carbon
|
||||||
*/
|
*/
|
||||||
public function nextDate(Carbon $date, int $interval = 1): Carbon
|
public function nextDate(Carbon $date, int $interval = 1): Carbon {
|
||||||
{
|
|
||||||
return ($date->clone())->addYearsNoOverflow($this->skip($interval));
|
return ($date->clone())->addYearsNoOverflow($this->skip($interval));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,7 @@ class AccountForm
|
|||||||
/**
|
/**
|
||||||
* @param array $types
|
* @param array $types
|
||||||
* @param AccountRepositoryInterface|null $repository
|
* @param AccountRepositoryInterface|null $repository
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function getAccountsGrouped(array $types, AccountRepositoryInterface $repository = null): array
|
private function getAccountsGrouped(array $types, AccountRepositoryInterface $repository = null): array
|
||||||
|
@ -39,6 +39,7 @@ trait ConvertsExchangeRates
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $set
|
* @param array $set
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function cerChartSet(array $set): array
|
public function cerChartSet(array $set): array
|
||||||
@ -84,6 +85,7 @@ trait ConvertsExchangeRates
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $currencyId
|
* @param int $currencyId
|
||||||
|
*
|
||||||
* @return TransactionCurrency
|
* @return TransactionCurrency
|
||||||
*/
|
*/
|
||||||
private function getCurrency(int $currencyId): TransactionCurrency
|
private function getCurrency(int $currencyId): TransactionCurrency
|
||||||
@ -99,6 +101,7 @@ trait ConvertsExchangeRates
|
|||||||
* @param TransactionCurrency $from
|
* @param TransactionCurrency $from
|
||||||
* @param TransactionCurrency $to
|
* @param TransactionCurrency $to
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): string
|
private function getRate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): string
|
||||||
@ -154,6 +157,7 @@ trait ConvertsExchangeRates
|
|||||||
/**
|
/**
|
||||||
* @param TransactionCurrency $currency
|
* @param TransactionCurrency $currency
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getEuroRate(TransactionCurrency $currency, Carbon $date): string
|
private function getEuroRate(TransactionCurrency $currency, Carbon $date): string
|
||||||
@ -203,6 +207,7 @@ trait ConvertsExchangeRates
|
|||||||
* the user.
|
* the user.
|
||||||
*
|
*
|
||||||
* @param array $entries
|
* @param array $entries
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function cerSum(array $entries): array
|
public function cerSum(array $entries): array
|
||||||
@ -258,6 +263,7 @@ trait ConvertsExchangeRates
|
|||||||
* @param TransactionCurrency $from
|
* @param TransactionCurrency $from
|
||||||
* @param TransactionCurrency $to
|
* @param TransactionCurrency $to
|
||||||
* @param Carbon|null $date
|
* @param Carbon|null $date
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function convertAmount(string $amount, TransactionCurrency $from, TransactionCurrency $to, ?Carbon $date = null): string
|
private function convertAmount(string $amount, TransactionCurrency $from, TransactionCurrency $to, ?Carbon $date = null): string
|
||||||
|
@ -32,6 +32,7 @@ use FireflyIII\Support\Calendar\Periodicity;
|
|||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Navigation.
|
* Class Navigation.
|
||||||
@ -48,30 +49,6 @@ class Navigation
|
|||||||
$this->calculator = ($calculator instanceof Calculator) ?: new Calculator();
|
$this->calculator = ($calculator instanceof Calculator) ?: new Calculator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Carbon $epoch
|
|
||||||
* @param Periodicity $periodicity
|
|
||||||
* @param int $skipInterval
|
|
||||||
* @return Carbon
|
|
||||||
*/
|
|
||||||
public function nextDateByInterval(Carbon $epoch, Periodicity $periodicity, int $skipInterval = 0): Carbon
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
return $this->calculator->nextDateByInterval($epoch, $periodicity, $skipInterval);
|
|
||||||
} catch (IntervalException $exception) {
|
|
||||||
Log::warning($exception->getMessage(), ['exception' => $exception]);
|
|
||||||
} catch (\Throwable $exception) {
|
|
||||||
Log::error($exception->getMessage(), ['exception' => $exception]);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::debug(
|
|
||||||
"Any error occurred to calculate the next date.",
|
|
||||||
['date' => $epoch, 'periodicity' => $periodicity->name, 'skipInterval' => $skipInterval]
|
|
||||||
);
|
|
||||||
|
|
||||||
return $epoch;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Carbon $theDate
|
* @param Carbon $theDate
|
||||||
* @param string $repeatFreq
|
* @param string $repeatFreq
|
||||||
@ -122,6 +99,31 @@ class Navigation
|
|||||||
return $this->nextDateByInterval($theDate, $functionMap[$repeatFreq], $skip);
|
return $this->nextDateByInterval($theDate, $functionMap[$repeatFreq], $skip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Carbon $epoch
|
||||||
|
* @param Periodicity $periodicity
|
||||||
|
* @param int $skipInterval
|
||||||
|
*
|
||||||
|
* @return Carbon
|
||||||
|
*/
|
||||||
|
public function nextDateByInterval(Carbon $epoch, Periodicity $periodicity, int $skipInterval = 0): Carbon
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return $this->calculator->nextDateByInterval($epoch, $periodicity, $skipInterval);
|
||||||
|
} catch (IntervalException $exception) {
|
||||||
|
Log::warning($exception->getMessage(), ['exception' => $exception]);
|
||||||
|
} catch (Throwable $exception) {
|
||||||
|
Log::error($exception->getMessage(), ['exception' => $exception]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::debug(
|
||||||
|
'Any error occurred to calculate the next date.',
|
||||||
|
['date' => $epoch, 'periodicity' => $periodicity->name, 'skipInterval' => $skipInterval]
|
||||||
|
);
|
||||||
|
|
||||||
|
return $epoch;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
@ -385,6 +387,7 @@ class Navigation
|
|||||||
* range to a normal range.
|
* range to a normal range.
|
||||||
*
|
*
|
||||||
* @param bool $correct
|
* @param bool $correct
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws NotFoundExceptionInterface
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user