RestoreEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 30
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTrashed() 0 4 1
A setTrashed() 0 5 1
1
<?php
2
3
/**
4
 * This software package is licensed under AGPL or Commercial license.
5
 *
6
 * @package maslosoft/mangan
7
 * @licence AGPL or Commercial
8
 * @copyright Copyright (c) Piotr Masełkowski <[email protected]>
9
 * @copyright Copyright (c) Maslosoft
10
 * @copyright Copyright (c) Others as mentioned in code
11
 * @link https://maslosoft.com/mangan/
12
 */
13
14
namespace Maslosoft\Mangan\Events;
15
16
use Maslosoft\Addendum\Interfaces\AnnotatedInterface;
17
use Maslosoft\Mangan\Model\Trash;
18
19
/**
20
 * RestoreEvent
21
 *
22
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
23
 */
24
class RestoreEvent extends TrashEvent
25
{
26
27
	/**
28
	 * Trashed item instance
29
	 * @var AnnotatedInterface
30
	 */
31
	private $trashed = null;
32
33
	/**
34
	 *
35
	 * @return Trash
36
	 */
37
	public function getTrashed()
38
	{
39
		return $this->trashed;
40
	}
41
42
	/**
43
	 *
44
	 * @param AnnotatedInterface $trashed
45
	 * @return RestoreEvent
46
	 */
47 1
	public function setTrashed(AnnotatedInterface $trashed)
48
	{
49 1
		$this->trashed = $trashed;
50 1
		return $this;
51
	}
52
53
}
54