B2cPaymentSuccessEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 5
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Samerior\MobileMoney\Mpesa\Events;
4
5
use Samerior\MobileMoney\Mpesa\Database\Entities\MpesaBulkPaymentResponse;
6
use Illuminate\Broadcasting\InteractsWithSockets;
7
use Illuminate\Foundation\Events\Dispatchable;
8
use Illuminate\Queue\SerializesModels;
9
10
/**
11
 * Class B2cPaymentSuccessEvent
12
 * @package Samerior\MobileMoney\Events
13
 */
14 View Code Duplication
class B2cPaymentSuccessEvent
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
    use Dispatchable, InteractsWithSockets, SerializesModels;
17
    /**
18
     * @var MpesaBulkPaymentResponse
19
     */
20
    public $bulkPaymentResponse;
21
    /**
22
     * @var array
23
     */
24
    public $response;
25
26
    /**
27
     * B2cPaymentSuccessEvent constructor.
28
     * @param MpesaBulkPaymentResponse $mpesaBulkPaymentResponse
29
     * @param array $response
30
     */
31
    public function __construct(MpesaBulkPaymentResponse $mpesaBulkPaymentResponse, $response)
32
    {
33
        $this->bulkPaymentResponse = $mpesaBulkPaymentResponse;
34
        $this->response = $response;
35
    }
36
}
37