Files
firefly-iii/app/Rules/IsDuplicateTransaction.php

45 lines
1.3 KiB
PHP
Raw Normal View History

<?php
2021-01-29 18:50:35 +01:00
/*
* IsDuplicateTransaction.php
* Copyright (c) 2021 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/>.
*/
2020-12-22 05:35:06 +01:00
declare(strict_types=1);
2020-11-08 14:13:21 +01:00
namespace FireflyIII\Rules;
2023-10-29 17:41:14 +01:00
use Illuminate\Contracts\Validation\ValidationRule;
use Closure;
2017-12-17 14:30:53 +01:00
/**
2023-10-29 17:41:14 +01:00
* TODO not sure where this is used.
*
2020-11-08 14:13:21 +01:00
* Class IsDuplicateTransaction
2017-12-17 14:30:53 +01:00
*/
2023-10-29 17:41:14 +01:00
class IsDuplicateTransaction implements ValidationRule
{
2023-12-21 06:06:23 +01:00
/**
2025-01-03 15:53:10 +01:00
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
2023-12-21 06:06:23 +01:00
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
2020-11-08 14:13:21 +01:00
{
2025-09-10 16:16:31 +02:00
$fail($value);
2020-11-08 14:13:21 +01:00
}
2020-12-22 05:35:06 +01:00
}