TrashEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTrash() 0 4 1
A setTrash() 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\Mangan\Events\ModelEvent;
17
use Maslosoft\Mangan\Events\TrashEvent;
18
use Maslosoft\Mangan\Interfaces\TrashInterface;
19
20
/**
21
 * TrashEvent
22
 *
23
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
24
 */
25
class TrashEvent extends ModelEvent
26
{
27
28
	/**
29
	 *
30
	 * @var TrashInterface
31
	 */
32
	private $trash = null;
33
34
	/**
35
	 * Get trash model used to store trashed data.
36
	 * @return TrashInterface
37
	 */
38 1
	public function getTrash()
39
	{
40 1
		return $this->trash;
41
	}
42
43
	/**
44
	 * Set trash model used to store trashed data.
45
	 * @param TrashInterface $trash
46
	 * @return TrashEvent
47
	 */
48 1
	public function setTrash(TrashInterface $trash)
49
	{
50 1
		$this->trash = $trash;
51 1
		return $this;
52
	}
53
54
}
55