AccountBalanceEvent::getRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the smsmode-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\SmsModeBundle\Event;
13
14
use WBW\Library\SmsMode\Request\AccountBalanceRequest;
15
use WBW\Library\SmsMode\Response\AccountBalanceResponse;
16
17
/**
18
 * Account balance event.
19
 *
20
 * @author webeweb <https://github.com/webeweb>
21
 * @package WBW\Bundle\SmsModeBundle\Event
22
 */
23
class AccountBalanceEvent extends AbstractEvent {
24
25
    /**
26
     * Event name.
27
     *
28
     * @var string
29
     */
30
    const EVENT_NAME = "wbw.smsmode.event.account_balance";
31
32
    /**
33
     * Constructor.
34
     */
35
    public function __construct() {
36
        parent::__construct(self::EVENT_NAME, null);
37
    }
38
39
    /**
40
     * Get the account balance request.
41
     *
42
     * @return AccountBalanceRequest|null Returns the account balance request.
43
     */
44
    public function getRequest(): ?AccountBalanceRequest {
45
        return parent::getRequest();
0 ignored issues
show
Bug Best Practice introduced by
The expression return parent::getRequest() could return the type WBW\Library\SmsMode\Request\AbstractRequest which includes types incompatible with the type-hinted return WBW\Library\SmsMode\Requ...ountBalanceRequest|null. Consider adding an additional type-check to rule them out.
Loading history...
46
    }
47
48
    /**
49
     * Get the account balance response.
50
     *
51
     * @return AccountBalanceResponse|null Returns the account balance response.
52
     */
53
    public function getResponse(): ?AccountBalanceResponse {
54
        return parent::getResponse();
0 ignored issues
show
Bug Best Practice introduced by
The expression return parent::getResponse() could return the type WBW\Library\SmsMode\Response\AbstractResponse which includes types incompatible with the type-hinted return WBW\Library\SmsMode\Resp...untBalanceResponse|null. Consider adding an additional type-check to rule them out.
Loading history...
55
    }
56
}
57