Code Duplication    Length = 8-8 lines in 2 locations

src/Mpesa/Library/Simulate.php 1 location

@@ 41-48 (lines=8) @@
38
     * @throws \Exception
39
     * @throws MpesaException
40
     */
41
    public function request($amount): self
42
    {
43
        if (!\is_numeric($amount)) {
44
            throw new MpesaException('The amount must be numeric');
45
        }
46
        $this->amount = $amount;
47
        return $this;
48
    }
49
50
    /**
51
     * Set the Mobile Subscriber Number to deduct the amount from.

src/Mpesa/Library/StkPush.php 1 location

@@ 42-49 (lines=8) @@
39
     * @throws \Exception
40
     * @throws MpesaException
41
     */
42
    public function request($amount): self
43
    {
44
        if (!\is_numeric($amount)) {
45
            throw new MpesaException('The amount must be numeric, got ' . $amount);
46
        }
47
        $this->amount = $amount;
48
        return $this;
49
    }
50
51
    /**
52
     * @param string $number