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.

Code Duplication    Length = 21-21 lines in 2 locations

src/Models/Wallet.php 2 locations

@@ 47-67 (lines=21) @@
44
     * @return Wallet
45
     * @throws Exception
46
     */
47
    public function incrementBalance($transaction)
48
    {
49
        if (is_numeric($transaction)) {
50
            $amount = $this->convertToWalletTypeInteger($transaction);
51
            $this->increment('raw_balance', $amount);
52
            $this->createWalletLedgerEntry($amount, $this->raw_balance);
53
54
            return $this;
55
        }
56
57
        if (! $transaction instanceof WalletTransaction) {
58
            throw new Exception('Increment balance expects parameter to be a float or a WalletTransaction object.');
59
        }
60
61
        $this->increment('raw_balance', $transaction->getAmount() * pow(10, $this->walletType->decimals));
62
63
        // Record in ledger
64
        $this->createWalletLedgerEntry($transaction, $this->raw_balance);
65
66
        return $this;
67
    }
68
69
    /**
70
     * @param $transaction WalletTransaction|integer|float|double
@@ 74-94 (lines=21) @@
71
     * @return Wallet
72
     * @throws Exception
73
     */
74
    public function decrementBalance($transaction)
75
    {
76
        if (is_numeric($transaction)) {
77
            $amount = $this->convertToWalletTypeInteger($transaction);
78
            $this->decrement('raw_balance', $amount);
79
            $this->createWalletLedgerEntry($amount, $this->raw_balance, 'decrement');
80
81
            return $this;
82
        }
83
84
        if (! $transaction instanceof WalletTransaction) {
85
            throw new Exception('Decrement balance expects parameter to be a number or a WalletTransaction object.');
86
        }
87
88
        $this->decrement('raw_balance', $transaction->getAmount() * pow(10, $this->walletType->decimals));
89
90
        // Record in ledger
91
        $this->createWalletLedgerEntry($transaction, $this->raw_balance, 'decrement');
92
93
        return $this;
94
    }
95
96
    /**
97
     * @param $transaction