Completed
Push — ezp-30616 ( ab7e14...128c78 )
by
unknown
17:09
created

BeforeEmptyTrashEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getResultList() 0 4 1
A setResultList() 0 4 1
A hasResultList() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace eZ\Publish\Core\Event\Trash;
6
7
use eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResultList;
8
use eZ\Publish\Core\Event\BeforeEvent;
9
10
final class BeforeEmptyTrashEvent extends BeforeEvent
11
{
12
	public const NAME = 'ezplatform.event.trash.empty.before';
13
14
	/**
15
     * @var \eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResultList|null
16
     */
17
	private $resultList;
18
19
20
	public function __construct()
21
	{
22
	}
23
24
25
	function getResultList(): ?TrashItemDeleteResultList
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
26
	{
27
		return $this->resultList;
28
	}
29
30
31
	function setResultList(?TrashItemDeleteResultList $resultList): void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
32
	{
33
		$this->resultList = $resultList;
34
	}
35
36
37
	function hasResultList(): bool
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
38
	{
39
		return $this->resultList instanceof TrashItemDeleteResultList;
40
	}
41
}
42