Issues (59)

Event/CreatingApiKeyEvent.php (2 issues)

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\CreatingApiKeyRequest;
15
use WBW\Library\SmsMode\Response\CreatingApiKeyResponse;
16
17
/**
18
 * Creating API key event.
19
 *
20
 * @author webeweb <https://github.com/webeweb>
21
 * @package WBW\Bundle\SmsModeBundle\Event
22
 */
23
class CreatingApiKeyEvent extends AbstractEvent {
24
25
    /**
26
     * Event name.
27
     *
28
     * @var string
29
     */
30
    const EVENT_NAME = "wbw.smsmode.event.creating_api_key";
31
32
    /**
33
     * Constructor.
34
     */
35
    public function __construct() {
36
        parent::__construct(self::EVENT_NAME, null);
37
    }
38
39
    /**
40
     * Get the creating API key request.
41
     *
42
     * @return CreatingApiKeyRequest|null Returns the creating API key request.
43
     */
44
    public function getRequest(): ?CreatingApiKeyRequest {
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...atingApiKeyRequest|null. Consider adding an additional type-check to rule them out.
Loading history...
46
    }
47
48
    /**
49
     * Get the creating API key response.
50
     *
51
     * @return CreatingApiKeyResponse|null Returns the creating API key response.
52
     */
53
    public function getResponse(): ?CreatingApiKeyResponse {
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...tingApiKeyResponse|null. Consider adding an additional type-check to rule them out.
Loading history...
55
    }
56
}
57