Code Duplication    Length = 7-7 lines in 2 locations

lib/private/Template/JSCombiner.php 1 location

@@ 212-218 (lines=7) @@
209
	 * @param string $fileName
210
	 * @return string
211
	 */
212
	public function getCachedJS($appName, $fileName) {
213
		$tmpfileLoc = explode('/', $fileName);
214
		$fileName = array_pop($tmpfileLoc);
215
		$fileName = str_replace('.json', '.js', $fileName);
216
217
		return substr($this->urlGenerator->linkToRoute('core.Js.getJs', array('fileName' => $fileName, 'appName' => $appName)), strlen(\OC::$WEBROOT) + 1);
218
	}
219
220
	/**
221
	 * @param string $root

lib/private/Template/SCSSCacher.php 1 location

@@ 323-329 (lines=7) @@
320
	 * @param string $fileName
321
	 * @return string
322
	 */
323
	public function getCachedSCSS(string $appName, string $fileName): string {
324
		$tmpfileLoc = explode('/', $fileName);
325
		$fileName = array_pop($tmpfileLoc);
326
		$fileName = $this->prependVersionPrefix($this->prependBaseurlPrefix(str_replace('.scss', '.css', $fileName)), $appName);
327
328
		return substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['fileName' => $fileName, 'appName' => $appName]), strlen(\OC::$WEBROOT) + 1);
329
	}
330
331
	/**
332
	 * Prepend hashed base url to the css file