Code Duplication    Length = 13-13 lines in 2 locations

lib/Service/TemplatesService.php 1 location

@@ 98-110 (lines=13) @@
95
	 *
96
	 * @return array
97
	 */
98
	public function getTemplatesList($customOnly = false) {
99
		$templates = [];
100
		if ($customOnly !== true) {
101
			$templates = self::TEMPLATES;
102
		}
103
104
		$customs = json_decode($this->configService->getAppValue(ConfigService::CUSTOM_TEMPLATES), true);
105
		if ($customs !== null) {
106
			$templates = array_merge($templates, $customs);
107
		}
108
109
		return $templates;
110
	}
111
112
113
	/**

lib/Service/ThemesService.php 1 location

@@ 83-95 (lines=13) @@
80
	 *
81
	 * @return array
82
	 */
83
	public function getThemesList($customOnly = false) {
84
		$themes = [];
85
		if ($customOnly !== true) {
86
			$themes = self::THEMES;
87
		}
88
89
		$customs = json_decode($this->configService->getAppValue(ConfigService::CUSTOM_THEMES), true);
90
		if ($customs !== null) {
91
			$themes = array_merge($themes, $customs);
92
		}
93
94
		return $themes;
95
	}
96
97
98
	/**