Completed
Push — master ( 44c8cf...8136fc )
by WEBEWEB
01:28
created

AddingContactEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 57
c 0
b 0
f 0
wmc 5
lcom 0
cbo 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAddingContact() 0 3 1
A getRequest() 0 3 1
A getResponse() 0 3 1
A setAddingContact() 0 4 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\AddingContactInterface;
15
use WBW\Library\SMSMode\Model\AddingContactRequest;
16
use WBW\Library\SMSMode\Model\AddingContactResponse;
17
18
/**
19
 * Adding contact event
20
 *
21
 * @author webeweb <https://github.com/webeweb/>
22
 * @package WBW\Bundle\SMSModeBundle\Event
23
 */
24
class AddingContactEvent extends AbstractResponseEvent {
25
26
    /**
27
     * Adding contact.
28
     *
29
     * @var AddingContactInterface
30
     */
31
    private $addingContact;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param AddingContactInterface $addingContact The adding contact.
37
     */
38
    public function __construct(AddingContactInterface $addingContact) {
39
        parent::__construct(SMSModeEvents::ADDING_CONTACT);
40
        $this->setAddingContact($addingContact);
41
    }
42
43
    /**
44
     * Get the adding contact.
45
     *
46
     * @return AddingContactInterface Returns the adding contact.
47
     */
48
    public function getAddingContact() {
49
        return $this->addingContact;
50
    }
51
52
    /**
53
     * Get the adding contact request.
54
     *
55
     * @return AddingContactRequest Returns the adding contact request.
56
     */
57
    public function getRequest() {
58
        return parent::getRequest();
59
    }
60
61
    /**
62
     * Get the adding contact response.
63
     *
64
     * @return AddingContactResponse Returns the adding contact response.
65
     */
66
    public function getResponse() {
67
        return parent::getResponse();
68
    }
69
70
    /**
71
     * Set the adding contact.
72
     *
73
     * @param AddingContactInterface $addingContact The adding contact.
74
     * @return AddingContactEvent Returns this adding contact event.
75
     */
76
    protected function setAddingContact(AddingContactInterface $addingContact) {
77
        $this->addingContact = $addingContact;
78
        return $this;
79
    }
80
}
81