C2bConfirmationEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Samerior\MobileMoney\Mpesa\Events;
4
5
use Samerior\MobileMoney\Mpesa\Database\Entities\MpesaC2bCallback;
6
use Illuminate\Broadcasting\InteractsWithSockets;
7
use Illuminate\Foundation\Events\Dispatchable;
8
use Illuminate\Queue\SerializesModels;
9
10
/**
11
 * Class C2BConfirmationEvent
12
 * @package Samerior\MobileMoney\Mpesa\Events
13
 */
14
class C2bConfirmationEvent
15
{
16
    use Dispatchable, InteractsWithSockets, SerializesModels;
17
    /**
18
     * @var MpesaC2bCallback
19
     */
20
    public $transaction;
21
    /**
22
     * @var array
23
     */
24
    public $mpesa_response;
25
26
    /**
27
     * C2BConfirmationEvent constructor.
28
     * @param MpesaC2bCallback $c2bCallback
29
     * @param array $response
30
     */
31
    public function __construct(MpesaC2bCallback $c2bCallback, array $response = [])
32
    {
33
        $this->transaction = $c2bCallback;
34
        $this->mpesa_response = $response;
35
    }
36
}
37