GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (724)

app/Import/Converter/BankDebitCredit.php (1 issue)

Severity
1
<?php
2
/**
3
 * BankDebitCredit.php
4
 * Copyright (c) 2019 [email protected]
5
 *
6
 * This file is part of Firefly III (https://github.com/firefly-iii).
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License as
10
 * published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License
19
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
 */
21
22
declare(strict_types=1);
23
24
namespace FireflyIII\Import\Converter;
25
26
27
use Log;
28
29
/**
30
 *
31
 * Class BankDebitCredit
32
 *
33
 * @deprecated
34
 * @codeCoverageIgnore
35
 */
36
class BankDebitCredit implements ConverterInterface
0 ignored issues
show
Deprecated Code introduced by
The interface FireflyIII\Import\Converter\ConverterInterface has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

36
class BankDebitCredit implements /** @scrutinizer ignore-deprecated */ ConverterInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
37
{
38
39
    /**
40
     * Convert a value.
41
     *
42
     * @param $value
43
     *
44
     * @return int
45
     */
46
    public function convert($value): int
47
    {
48
        Log::debug('Going to convert ', ['value' => $value]);
49
        $negative = [
50
            'D', // Old style Rabobank (NL). Short for "Debit"
51
            'A', // New style Rabobank (NL). Short for "Af"
52
            'DR', // https://old.reddit.com/r/FireflyIII/comments/bn2edf/generic_debitcredit_indicator/
53
            'Af', // ING (NL).
54
            'Debet', // Triodos (NL)
55
            'S', // "Soll", German term for debit
56
            'Debit', // Community America (US)
57
        ];
58
        if (in_array(trim($value), $negative, true)) {
59
            return -1;
60
        }
61
62
        return 1;
63
    }
64
}
65