mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Code for new release
This commit is contained in:
		| @@ -155,9 +155,9 @@ class ReconcileController extends Controller | ||||
|      * Submit a new reconciliation. | ||||
|      * | ||||
|      * @param ReconciliationStoreRequest $request | ||||
|      * @param Account $account | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * @param Account                    $account | ||||
|      * @param Carbon                     $start | ||||
|      * @param Carbon                     $end | ||||
|      * | ||||
|      * @return RedirectResponse|Redirector | ||||
|      * @throws DuplicateTransactionException | ||||
|   | ||||
| @@ -23,7 +23,6 @@ declare(strict_types=1); | ||||
|  | ||||
| namespace FireflyIII\Http\Controllers\Admin; | ||||
|  | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Http\Controllers\Controller; | ||||
| use FireflyIII\Http\Middleware\IsDemoUser; | ||||
| use FireflyIII\Http\Requests\ConfigurationRequest; | ||||
|   | ||||
| @@ -24,7 +24,6 @@ declare(strict_types=1); | ||||
| namespace FireflyIII\Http\Controllers\Admin; | ||||
|  | ||||
| use FireflyIII\Events\AdminRequestedTestMessage; | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Http\Controllers\Controller; | ||||
| use FireflyIII\Http\Middleware\IsDemoUser; | ||||
| use FireflyIII\Support\Facades\FireflyConfig; | ||||
| @@ -84,6 +83,7 @@ class HomeController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param Request $request | ||||
|      * | ||||
|      * @return RedirectResponse | ||||
|      */ | ||||
|     public function notifications(Request $request): RedirectResponse | ||||
|   | ||||
| @@ -89,6 +89,7 @@ class UserController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param InvitedUser $invitedUser | ||||
|      * | ||||
|      * @return JsonResponse | ||||
|      */ | ||||
|     public function deleteInvite(InvitedUser $invitedUser): JsonResponse | ||||
| @@ -192,6 +193,7 @@ class UserController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param InviteUserFormRequest $request | ||||
|      * | ||||
|      * @return RedirectResponse | ||||
|      */ | ||||
|     public function invite(InviteUserFormRequest $request): RedirectResponse | ||||
|   | ||||
| @@ -35,7 +35,6 @@ use Illuminate\Http\Request; | ||||
| use Illuminate\Support\Collection; | ||||
| use Illuminate\Support\Facades\Log; | ||||
| use Illuminate\View\View; | ||||
| use JsonException; | ||||
| use Psr\Container\ContainerExceptionInterface; | ||||
| use Psr\Container\NotFoundExceptionInterface; | ||||
|  | ||||
|   | ||||
| @@ -517,6 +517,7 @@ class AccountController extends Controller | ||||
|      * | ||||
|      * @param Carbon     $start | ||||
|      * @param Carbon     $end | ||||
|      * | ||||
|      * @return JsonResponse | ||||
|      * @throws FireflyException | ||||
|      * @throws JsonException | ||||
|   | ||||
| @@ -24,7 +24,6 @@ declare(strict_types=1); | ||||
| namespace FireflyIII\Http\Controllers\Chart; | ||||
|  | ||||
| use Carbon\Carbon; | ||||
| use FireflyIII\Exceptions\FireflyException; | ||||
| use FireflyIII\Generator\Chart\Basic\GeneratorInterface; | ||||
| use FireflyIII\Helpers\Collector\GroupCollectorInterface; | ||||
| use FireflyIII\Helpers\Report\NetWorthInterface; | ||||
|   | ||||
| @@ -208,6 +208,7 @@ class CurrencyController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param Request $request | ||||
|      * | ||||
|      * @return JsonResponse | ||||
|      * @throws FireflyException | ||||
|      */ | ||||
| @@ -300,6 +301,7 @@ class CurrencyController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param Request $request | ||||
|      * | ||||
|      * @return JsonResponse | ||||
|      */ | ||||
|     public function enableCurrency(Request $request): JsonResponse | ||||
|   | ||||
| @@ -32,8 +32,6 @@ use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface; | ||||
| use Illuminate\Http\JsonResponse; | ||||
| use Illuminate\Http\Request; | ||||
| use Illuminate\Support\Facades\Log; | ||||
| use Psr\Container\ContainerExceptionInterface; | ||||
| use Psr\Container\NotFoundExceptionInterface; | ||||
|  | ||||
| /** | ||||
|  * Class RecurrenceController | ||||
| @@ -148,11 +146,11 @@ class RecurrenceController extends Controller | ||||
|      */ | ||||
|     public function suggest(Request $request): JsonResponse | ||||
|     { | ||||
|         $string      = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date'); | ||||
|         $today       = today(config('app.timezone'))->startOfDay(); | ||||
|         $string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date'); | ||||
|         $today  = today(config('app.timezone'))->startOfDay(); | ||||
|         try { | ||||
|             $date = Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'))->startOfDay(); | ||||
|         } catch(InvalidFormatException $e) { | ||||
|         } catch (InvalidFormatException $e) { | ||||
|             $date = Carbon::today(config('app.timezone')); | ||||
|         } | ||||
|         $preSelected = (string)$request->get('pre_select'); | ||||
|   | ||||
| @@ -54,12 +54,12 @@ class ReportController extends Controller | ||||
|         app('view')->share('end', $attributes['endDate']); | ||||
|  | ||||
|         $html = match ($attributes['location']) { | ||||
|             default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']), | ||||
|             default               => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']), | ||||
|             'budget-spent-amount' => $this->budgetSpentAmount($attributes), | ||||
|             'expense-entry' => $this->expenseEntry($attributes), | ||||
|             'income-entry' => $this->incomeEntry($attributes), | ||||
|             'category-entry' => $this->categoryEntry($attributes), | ||||
|             'budget-entry' => $this->budgetEntry($attributes), | ||||
|             'expense-entry'       => $this->expenseEntry($attributes), | ||||
|             'income-entry'        => $this->incomeEntry($attributes), | ||||
|             'category-entry'      => $this->categoryEntry($attributes), | ||||
|             'budget-entry'        => $this->budgetEntry($attributes), | ||||
|         }; | ||||
|         return response()->json(['html' => $html]); | ||||
|     } | ||||
|   | ||||
| @@ -1,5 +1,26 @@ | ||||
| <?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); | ||||
| /* | ||||
|  * TriggerController.php | ||||
| @@ -41,6 +62,7 @@ class TriggerController extends Controller | ||||
|     /** | ||||
|      * @param Recurrence               $recurrence | ||||
|      * @param TriggerRecurrenceRequest $request | ||||
|      * | ||||
|      * @return RedirectResponse | ||||
|      */ | ||||
|     public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse | ||||
|   | ||||
| @@ -45,8 +45,8 @@ class BillController extends Controller | ||||
|      * @return mixed|string | ||||
|      * @throws FireflyException | ||||
|      */ | ||||
|     public function overview(Collection $accounts, Carbon $start, Carbon $end) | ||||
|     {   // chart properties for cache: | ||||
|     public function overview(Collection $accounts, Carbon $start, Carbon $end)   // chart properties for cache: | ||||
|     { | ||||
|         $cache = new CacheProperties(); | ||||
|         $cache->addProperty($start); | ||||
|         $cache->addProperty($end); | ||||
|   | ||||
| @@ -313,11 +313,11 @@ class ReportController extends Controller | ||||
|     public function options(string $reportType) | ||||
|     { | ||||
|         $result = match ($reportType) { | ||||
|             default => $this->noReportOptions(), | ||||
|             default    => $this->noReportOptions(), | ||||
|             'category' => $this->categoryReportOptions(), | ||||
|             'budget' => $this->budgetReportOptions(), | ||||
|             'tag' => $this->tagReportOptions(), | ||||
|             'double' => $this->doubleReportOptions(), | ||||
|             'budget'   => $this->budgetReportOptions(), | ||||
|             'tag'      => $this->tagReportOptions(), | ||||
|             'double'   => $this->doubleReportOptions(), | ||||
|         }; | ||||
|  | ||||
|         return response()->json(['html' => $result]); | ||||
| @@ -381,12 +381,12 @@ class ReportController extends Controller | ||||
|         } | ||||
|  | ||||
|         $url = match ($reportType) { | ||||
|             default => route('reports.report.default', [$accounts, $start, $end]), | ||||
|             default    => route('reports.report.default', [$accounts, $start, $end]), | ||||
|             'category' => route('reports.report.category', [$accounts, $categories, $start, $end]), | ||||
|             'audit' => route('reports.report.audit', [$accounts, $start, $end]), | ||||
|             'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]), | ||||
|             'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]), | ||||
|             'double' => route('reports.report.double', [$accounts, $double, $start, $end]), | ||||
|             'audit'    => route('reports.report.audit', [$accounts, $start, $end]), | ||||
|             'budget'   => route('reports.report.budget', [$accounts, $budgets, $start, $end]), | ||||
|             'tag'      => route('reports.report.tag', [$accounts, $tags, $start, $end]), | ||||
|             'double'   => route('reports.report.double', [$accounts, $double, $start, $end]), | ||||
|         }; | ||||
|  | ||||
|         return redirect($url); | ||||
|   | ||||
| @@ -241,6 +241,7 @@ class CreateController extends Controller | ||||
|  | ||||
|     /** | ||||
|      * @param Request $request | ||||
|      * | ||||
|      * @return JsonResponse | ||||
|      */ | ||||
|     public function duplicate(Request $request): JsonResponse | ||||
|   | ||||
| @@ -138,6 +138,7 @@ class InstallController extends Controller | ||||
|     /** | ||||
|      * @param string $command | ||||
|      * @param array  $args | ||||
|      * | ||||
|      * @return bool | ||||
|      * @throws FireflyException | ||||
|      */ | ||||
|   | ||||
| @@ -155,6 +155,7 @@ class LinkController extends Controller | ||||
|      * Switch link from A <> B to B <> A. | ||||
|      * | ||||
|      * @param Request $request | ||||
|      * | ||||
|      * @return RedirectResponse|Redirector | ||||
|      */ | ||||
|     public function switchLink(Request $request) | ||||
|   | ||||
| @@ -39,6 +39,7 @@ class AcceptHeaders | ||||
|      * | ||||
|      * @param Request  $request | ||||
|      * @param callable $next | ||||
|      * | ||||
|      * @return Response | ||||
|      * @throws BadHttpHeaderException | ||||
|      */ | ||||
| @@ -78,6 +79,7 @@ class AcceptHeaders | ||||
|     /** | ||||
|      * @param string $content | ||||
|      * @param array  $accepted | ||||
|      * | ||||
|      * @return bool | ||||
|      */ | ||||
|     private function acceptsHeader(string $content, array $accepted): bool | ||||
|   | ||||
| @@ -121,6 +121,7 @@ class Authenticate | ||||
|     /** | ||||
|      * @param User|null $user | ||||
|      * @param array     $guards | ||||
|      * | ||||
|      * @return void | ||||
|      * @throws AuthenticationException | ||||
|      */ | ||||
|   | ||||
| @@ -86,6 +86,7 @@ class RuleFormRequest extends FormRequest | ||||
|  | ||||
|     /** | ||||
|      * @param array $array | ||||
|      * | ||||
|      * @return array | ||||
|      */ | ||||
|     public static function replaceAmountTrigger(array $array): array | ||||
|   | ||||
| @@ -1,9 +1,9 @@ | ||||
| <?php | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| /* | ||||
|  * 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). | ||||
|  * | ||||
| @@ -21,6 +21,8 @@ declare(strict_types=1); | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  */ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace FireflyIII\Http\Requests; | ||||
|  | ||||
| use FireflyIII\Support\Request\ChecksLogin; | ||||
| @@ -40,8 +42,7 @@ class TriggerRecurrenceRequest extends FormRequest | ||||
|      * | ||||
|      * @return array | ||||
|      */ | ||||
|     public function getAll(): array | ||||
|     { | ||||
|     public function getAll(): array { | ||||
|         return [ | ||||
|             'date' => $this->getCarbonDate('date'), | ||||
|         ]; | ||||
| @@ -52,8 +53,7 @@ class TriggerRecurrenceRequest extends FormRequest | ||||
|      * | ||||
|      * @return array | ||||
|      */ | ||||
|     public function rules(): array | ||||
|     { | ||||
|     public function rules(): array { | ||||
|         return [ | ||||
|             'date' => 'required|date', | ||||
|         ]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user