Code Duplication    Length = 40-40 lines in 2 locations

src/IPub/MQTTClient/Events/ErrorEvent.php 1 location

@@ 33-72 (lines=40) @@
30
 *
31
 * @author         Adam Kadlec <[email protected]>
32
 */
33
final class ErrorEvent extends EventDispatcher\Event
34
{
35
	/**
36
	 * @var Exception
37
	 */
38
	private $exception;
39
40
	/**
41
	 * @var Client\IClient
42
	 */
43
	private $client;
44
45
	/**
46
	 * @param Exception $exception
47
	 * @param Client\IClient $client
48
	 */
49
	public function __construct(
50
		Exception $exception,
51
		Client\IClient $client
52
	) {
53
		$this->exception = $exception;
54
		$this->client = $client;
55
	}
56
57
	/**
58
	 * @return Exception
59
	 */
60
	public function getException() : Exception
61
	{
62
		return $this->exception;
63
	}
64
65
	/**
66
	 * @return Client\IClient
67
	 */
68
	public function getClient() : Client\IClient
69
	{
70
		return $this->client;
71
	}
72
}
73

src/IPub/MQTTClient/Events/WarningEvent.php 1 location

@@ 33-72 (lines=40) @@
30
 *
31
 * @author         Adam Kadlec <[email protected]>
32
 */
33
final class WarningEvent extends EventDispatcher\Event
34
{
35
	/**
36
	 * @var Exception
37
	 */
38
	private $exception;
39
40
	/**
41
	 * @var Client\IClient
42
	 */
43
	private $client;
44
45
	/**
46
	 * @param Exception $exception
47
	 * @param Client\IClient $client
48
	 */
49
	public function __construct(
50
		Exception $exception,
51
		Client\IClient $client
52
	) {
53
		$this->exception = $exception;
54
		$this->client = $client;
55
	}
56
57
	/**
58
	 * @return Exception
59
	 */
60
	public function getException() : Exception
61
	{
62
		return $this->exception;
63
	}
64
65
	/**
66
	 * @return Client\IClient
67
	 */
68
	public function getClient() : Client\IClient
69
	{
70
		return $this->client;
71
	}
72
}
73