Completed
Push — master ( b5d31e...39468f )
by Lukas
13:10
created

MailNotifications::createMailBody()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 19
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 15
nc 2
nop 4
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * @copyright Copyright (c) 2016, ownCloud, Inc.
4
 *
5
 * @author Björn Schießle <[email protected]>
6
 * @author Joas Schilling <[email protected]>
7
 * @author Lukas Reschke <[email protected]>
8
 * @author Morris Jobke <[email protected]>
9
 * @author Robin McCorkell <[email protected]>
10
 * @author Roeland Jago Douma <[email protected]>
11
 * @author scolebrook <[email protected]>
12
 * @author Thomas Müller <[email protected]>
13
 * @author Vincent Petry <[email protected]>
14
 *
15
 * @license AGPL-3.0
16
 *
17
 * This code is free software: you can redistribute it and/or modify
18
 * it under the terms of the GNU Affero General Public License, version 3,
19
 * as published by the Free Software Foundation.
20
 *
21
 * This program is distributed in the hope that it will be useful,
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
 * GNU Affero General Public License for more details.
25
 *
26
 * You should have received a copy of the GNU Affero General Public License, version 3,
27
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
28
 *
29
 */
30
31
namespace OC\Share;
32
33
use OCP\IL10N;
34
use OCP\IURLGenerator;
35
use OCP\IUser;
36
use OCP\Mail\IMailer;
37
use OCP\ILogger;
38
use OCP\Defaults;
39
use OCP\Util;
40
41
/**
42
 * Class MailNotifications
43
 *
44
 * @package OC\Share
45
 */
46
class MailNotifications {
47
48
	/** @var IUser sender userId */
49
	private $user;
50
	/** @var string sender email address */
51
	private $replyTo;
52
	/** @var string */
53
	private $senderDisplayName;
54
	/** @var IL10N */
55
	private $l;
56
	/** @var IMailer */
57
	private $mailer;
58
	/** @var Defaults */
59
	private $defaults;
60
	/** @var ILogger */
61
	private $logger;
62
	/** @var IURLGenerator */
63
	private $urlGenerator;
64
65
	/**
66
	 * @param IUser $user
67
	 * @param IL10N $l10n
68
	 * @param IMailer $mailer
69
	 * @param ILogger $logger
70
	 * @param Defaults $defaults
71
	 * @param IURLGenerator $urlGenerator
72
	 */
73
	public function __construct(IUser $user,
74
								IL10N $l10n,
75
								IMailer $mailer,
76
								ILogger $logger,
77
								Defaults $defaults,
78
								IURLGenerator $urlGenerator) {
79
		$this->l = $l10n;
80
		$this->user = $user;
81
		$this->mailer = $mailer;
82
		$this->logger = $logger;
83
		$this->defaults = $defaults;
84
		$this->urlGenerator = $urlGenerator;
85
86
		$this->replyTo = $this->user->getEMailAddress();
87
		$this->senderDisplayName = $this->user->getDisplayName();
88
	}
89
}
90