Passed
Push — master ( 6ee383...2da01e )
by Adam
48s queued 10s
created

UnregisterEvent::getPackage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * UnregisterEvent.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        https://www.ipublikuj.eu
7
 * @author         Adam Kadlec <[email protected]>
8
 * @package        iPublikuj:Packages!
9
 * @subpackage     Events
10
 * @since          1.0.0
11
 *
12
 * @date           15.11.19
13
 */
14
15
namespace IPub\Packages\Events;
16
17
use Symfony\Contracts\EventDispatcher;
18
19
use IPub\Packages;
20
use IPub\Packages\Entities;
21
22
/**
23
 * Package unregistered event
24
 *
25
 * @package        iPublikuj:Packages!
26
 * @subpackage     Events
27
 *
28
 * @author         Adam Kadlec <[email protected]>
29
 */
30 View Code Duplication
final class UnregisterEvent extends EventDispatcher\Event
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
31
{
32
	/**
33
	 * @var Packages\PackagesManager
34
	 */
35
	private $manager;
36
37
	/**
38
	 * @var Entities\IPackage
39
	 */
40
	private $package;
41
42
	/**
43
	 * @param Packages\PackagesManager $manager
44
	 * @param Entities\IPackage $package
45
	 */
46
	public function __construct(
47
		Packages\PackagesManager $manager,
48
		Entities\IPackage $package
49
	) {
50
		$this->manager = $manager;
51
		$this->package = $package;
52
	}
53
54
	/**
55
	 * @return Packages\PackagesManager
56
	 */
57
	public function getManager() : Packages\PackagesManager
58
	{
59
		return $this->manager;
60
	}
61
62
	/**
63
	 * @return Entities\IPackage
64
	 */
65
	public function getPackage() : Entities\IPackage
66
	{
67
		return $this->package;
68
	}
69
}
70