Code Duplication    Length = 29-39 lines in 4 locations

apps/files_external/lib/Settings/Section.php 1 location

@@ 29-67 (lines=39) @@
26
use OCP\IL10N;
27
use OCP\Settings\ISection;
28
29
class Section implements ISection {
30
	/** @var IL10N */
31
	private $l;
32
33
	public function __construct(IL10N $l) {
34
		$this->l = $l;
35
	}
36
37
	/**
38
	 * returns the ID of the section. It is supposed to be a lower case string,
39
	 * e.g. 'ldap'
40
	 *
41
	 * @returns string
42
	 */
43
	public function getID() {
44
		return 'externalstorages';
45
	}
46
47
	/**
48
	 * returns the translated name as it should be displayed, e.g. 'LDAP / AD
49
	 * integration'. Use the L10N service to translate it.
50
	 *
51
	 * @return string
52
	 */
53
	public function getName() {
54
		return $this->l->t('External storages');
55
	}
56
57
	/**
58
	 * @return int whether the form should be rather on the top or bottom of
59
	 * the settings navigation. The sections are arranged in ascending order of
60
	 * the priority values. It is required to return a value between 0 and 99.
61
	 *
62
	 * E.g.: 70
63
	 */
64
	public function getPriority() {
65
		return 10;
66
	}
67
}
68

apps/theming/lib/Settings/Section.php 1 location

@@ 29-67 (lines=39) @@
26
use OCP\IL10N;
27
use OCP\Settings\ISection;
28
29
class Section implements ISection {
30
	/** @var IL10N */
31
	private $l;
32
33
	public function __construct(IL10N $l) {
34
		$this->l = $l;
35
	}
36
37
	/**
38
	 * returns the ID of the section. It is supposed to be a lower case string,
39
	 * e.g. 'ldap'
40
	 *
41
	 * @returns string
42
	 */
43
	public function getID() {
44
		return 'theming';
45
	}
46
47
	/**
48
	 * returns the translated name as it should be displayed, e.g. 'LDAP / AD
49
	 * integration'. Use the L10N service to translate it.
50
	 *
51
	 * @return string
52
	 */
53
	public function getName() {
54
		return $this->l->t('Theming');
55
	}
56
57
	/**
58
	 * @return int whether the form should be rather on the top or bottom of
59
	 * the settings navigation. The sections are arranged in ascending order of
60
	 * the priority values. It is required to return a value between 0 and 99.
61
	 *
62
	 * E.g.: 70
63
	 */
64
	public function getPriority() {
65
		return 30;
66
	}
67
}
68

apps/user_ldap/lib/Settings/Section.php 1 location

@@ 29-67 (lines=39) @@
26
use OCP\IL10N;
27
use OCP\Settings\ISection;
28
29
class Section implements ISection {
30
	/** @var IL10N */
31
	private $l;
32
33
	public function __construct(IL10N $l) {
34
		$this->l = $l;
35
	}
36
37
	/**
38
	 * returns the ID of the section. It is supposed to be a lower case string,
39
	 * e.g. 'ldap'
40
	 *
41
	 * @returns string
42
	 */
43
	public function getID() {
44
		return 'ldap';
45
	}
46
47
	/**
48
	 * returns the translated name as it should be displayed, e.g. 'LDAP / AD
49
	 * integration'. Use the L10N service to translate it.
50
	 *
51
	 * @return string
52
	 */
53
	public function getName() {
54
		return $this->l->t('LDAP / AD integration');
55
	}
56
57
	/**
58
	 * @return int whether the form should be rather on the top or bottom of
59
	 * the settings navigation. The sections are arranged in ascending order of
60
	 * the priority values. It is required to return a value between 0 and 99.
61
	 *
62
	 * E.g.: 70
63
	 */
64
	public function getPriority() {
65
		return 25;
66
	}
67
}
68

apps/workflowengine/lib/Settings/Section.php 1 location

@@ 29-57 (lines=29) @@
26
use OCP\IL10N;
27
use OCP\Settings\ISection;
28
29
class Section implements ISection {
30
	/** @var IL10N */
31
	private $l;
32
33
	public function __construct(IL10N $l) {
34
		$this->l = $l;
35
	}
36
37
	/**
38
	 * {@inheritdoc}
39
	 */
40
	public function getID() {
41
		return 'workflow';
42
	}
43
44
	/**
45
	 * {@inheritdoc}
46
	 */
47
	public function getName() {
48
		return $this->l->t('Workflow');
49
	}
50
51
	/**
52
	 * {@inheritdoc}
53
	 */
54
	public function getPriority() {
55
		return 55;
56
	}
57
}
58