Passed
Push — master ( bce941...17d0da )
by John
67:35 queued 55:34
created

Setting::canChangeStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * @copyright Copyright (c) 2021 Joas Schilling <[email protected]>
6
 *
7
 * @author Joas Schilling <[email protected]>
8
 *
9
 * @license GNU AGPL version 3 or any later version
10
 *
11
 * This program is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU Affero General Public License as
13
 * published by the Free Software Foundation, either version 3 of the
14
 * License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License
22
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
 *
24
 */
25
26
namespace OCA\DAV\CardDAV\Activity;
27
28
use OCA\DAV\CalDAV\Activity\Setting\CalDAVSetting;
29
30
class Setting extends CalDAVSetting {
31
	/**
32
	 * @return string Lowercase a-z and underscore only identifier
33
	 */
34
	public function getIdentifier(): string {
35
		return 'contacts';
36
	}
37
38
	/**
39
	 * @return string A translated string
40
	 */
41
	public function getName(): string {
42
		return $this->l->t('A <strong>contact</strong> or <strong>addressbook</strong> was modified');
43
	}
44
45
	/**
46
	 * @return int whether the filter should be rather on the top or bottom of
47
	 * the admin section. The filters are arranged in ascending order of the
48
	 * priority values. It is required to return a value between 0 and 100.
49
	 */
50
	public function getPriority(): int {
51
		return 50;
52
	}
53
54
	/**
55
	 * @return bool True when the option can be changed for the stream
56
	 */
57
	public function canChangeStream(): bool {
58
		return true;
59
	}
60
61
	/**
62
	 * @return bool True when the option can be changed for the stream
63
	 */
64
	public function isDefaultEnabledStream(): bool {
65
		return true;
66
	}
67
68
	/**
69
	 * @return bool True when the option can be changed for the mail
70
	 */
71
	public function canChangeMail(): bool {
72
		return true;
73
	}
74
75
	/**
76
	 * @return bool True when the option can be changed for the stream
77
	 */
78
	public function isDefaultEnabledMail(): bool {
79
		return false;
80
	}
81
}
82