SmsProvider::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author Christoph Wurst <[email protected]>
7
 *
8
 * Nextcloud - Two-factor Gateway
9
 *
10
 * This code is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU Affero General Public License, version 3,
12
 * as published by the Free Software Foundation.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
 * GNU Affero General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU Affero General Public License, version 3,
20
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
21
 *
22
 */
23
24
namespace OCA\TwoFactorGateway\Provider;
25
26
use OCA\TwoFactorGateway\Service\Gateway\SMS\Gateway;
27
use OCA\TwoFactorGateway\Service\StateStorage;
28
use OCP\IL10N;
29
use OCP\ISession;
30
use OCP\Security\ISecureRandom;
31
32
class SmsProvider extends AProvider {
33
	public function __construct(Gateway $smsGateway,
34
		StateStorage $stateStorage,
35
		ISession $session,
36
		ISecureRandom $secureRandom,
37
		IL10N $l10n) {
38
		parent::__construct(
39
			'sms',
40
			$smsGateway,
41
			$stateStorage,
42
			$session,
43
			$secureRandom,
44
			$l10n
45
		);
46
	}
47
48
	/**
49
	 * Get the display name for selecting the 2FA provider
50
	 */
51
	public function getDisplayName(): string {
52
		return $this->l10n->t('Message gateway verification');
53
	}
54
55
	/**
56
	 * Get the description for selecting the 2FA provider
57
	 */
58
	public function getDescription(): string {
59
		return $this->l10n->t('Authenticate via SMS');
60
	}
61
}
62