Code Duplication    Length = 9-10 lines in 2 locations

lib/private/Template/JSCombiner.php 1 location

@@ 250-258 (lines=9) @@
247
	 *
248
	 * @throws NotFoundException
249
	 */
250
	public function resetCache() {
251
		$this->cacheFactory->createDistributed('JS-')->clear();
252
		$appDirectory = $this->appData->getDirectoryListing();
253
		foreach ($appDirectory as $folder) {
254
			foreach ($folder->getDirectoryListing() as $file) {
255
				$file->delete();
256
			}
257
		}
258
	}
259
}
260

lib/private/Template/SCSSCacher.php 1 location

@@ 270-279 (lines=10) @@
267
	 * Reset scss cache by deleting all generated css files
268
	 * We need to regenerate all files when variables change
269
	 */
270
	public function resetCache() {
271
		$this->injectedVariables = null;
272
		$this->cacheFactory->createDistributed('SCSS-')->clear();
273
		$appDirectory = $this->appData->getDirectoryListing();
274
		foreach ($appDirectory as $folder) {
275
			foreach ($folder->getDirectoryListing() as $file) {
276
				$file->delete();
277
			}
278
		}
279
	}
280
281
	/**
282
	 * @return string SCSS code for variables from OC_Defaults