Passed
Push — master ( 52957d...b93e1e )
by Roeland
24:45 queued 12:33
created

BeforeMessageSent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMessage() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright 2020 Arne Hamann <[email protected]>
7
 *
8
 * @author Arne Hamann <[email protected]>
9
 *
10
 * @license GNU AGPL version 3 or any later version
11
 *
12
 * This program is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU Affero General Public License as
14
 * published by the Free Software Foundation, either version 3 of the
15
 * License, or (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU Affero General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU Affero General Public License
23
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
 *
25
 */
26
27
namespace OCP\Mail\Events;
28
29
use OCP\EventDispatcher\Event;
30
use OCP\Mail\IMessage;
31
32
/**
33
 * @since 19.0.0
34
 */
35
class BeforeMessageSent extends Event {
36
37
	/** @var IMessage */
38
	private $message;
39
40
	/**
41
	 * @param IMessage $message
42
	 * @since 19.0.0
43
	 */
44
	public function __construct(IMessage $message) {
45
		parent::__construct();
46
		$this->message = $message;
47
	}
48
49
	/**
50
	 * @return IMessage
51
	 * @since 19.0.0
52
	 */
53
	public function getMessage(): IMessage {
54
		return $this->message;
55
	}
56
57
}
58