Passed
Push — master ( 958a85...6386e9 )
by Adam
50s queued 10s
created

PingEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getClient() 0 4 1
1
<?php
2
/**
3
 * PingEvent.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:MQTTClient!
9
 * @subpackage     Events
10
 * @since          1.0.0
11
 *
12
 * @date           14.11.19
13
 */
14
15
namespace IPub\MQTTClient\Events;
16
17
use Symfony\Contracts\EventDispatcher;
18
19
use IPub\MQTTClient\Client;
20
21
/**
22
 * PING event
23
 *
24
 * @package        iPublikuj:MQTTClient!
25
 * @subpackage     Events
26
 *
27
 * @author         Adam Kadlec <[email protected]>
28
 */
29
final class PingEvent extends EventDispatcher\Event
30
{
31
	/**
32
	 * @var Mqtt\Connection
33
	 */
34
	private $connection;
35
36
	/**
37
	 * @var Client\IClient
38
	 */
39
	private $client;
40
41
	/**
42
	 * @param Client\IClient $client
43
	 */
44
	public function __construct(
45
		Client\IClient $client
46
	) {
47
		$this->client = $client;
48
	}
49
50
	/**
51
	 * @return Client\IClient
52
	 */
53
	public function getClient() : Client\IClient
54
	{
55
		return $this->client;
56
	}
57
}
58