Completed
Push — master ( 8136fc...95a8d0 )
by WEBEWEB
01:22
created

RetrievingSMSReplyEvent::setRetrievingSMSReply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
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\Bundle\SMSModeBundle\Entity\RetrievingSMSReplyInterface;
15
use WBW\Library\SMSMode\Model\RetrievingSMSReplyRequest;
16
use WBW\Library\SMSMode\Model\RetrievingSMSReplyResponse;
17
18
/**
19
 * Retrieving SMS reply event
20
 *
21
 * @author webeweb <https://github.com/webeweb/>
22
 * @package WBW\Bundle\SMSModeBundle\Event
23
 */
24
class RetrievingSMSReplyEvent extends AbstractSMSModeEvent {
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param RetrievingSMSReplyInterface $retrievingSMSReply The retrieving SMS reply.
30
     */
31
    public function __construct(RetrievingSMSReplyInterface $retrievingSMSReply) {
32
        parent::__construct(SMSModeEvents::RETRIEVING_SMS_REPLY, $retrievingSMSReply);
33
    }
34
35
    /**
36
     * Get the retrieving SMS reply request.
37
     *
38
     * @return RetrievingSMSReplyRequest Returns the retrieving SMS reply request.
39
     */
40
    public function getRequest() {
41
        return parent::getRequest();
42
    }
43
44
    /**
45
     * Get the retrieving SMS reply response.
46
     *
47
     * @return RetrievingSMSReplyResponse Returns the retrieving SMS reply response.
48
     */
49
    public function getResponse() {
50
        return parent::getResponse();
51
    }
52
53
    /**
54
     * Get the retrieving SMS reply.
55
     *
56
     * @return RetrievingSMSReplyInterface Returns the retrieving SMS reply.
57
     */
58
    public function getRetrievingSMSReply() {
59
        return parent::getEntity();
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (getEntity() instead of getRetrievingSMSReply()). Are you sure this is correct? If so, you might want to change this to $this->getEntity().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
60
    }
61
}
62