Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Files/Cache/Scanner.php 2 locations

@@ 161-164 (lines=4) @@
158
				if ($data) {
159
160
					// pre-emit only if it was a file. By that we avoid counting/treating folders as files
161
					if ($data['mimetype'] !== 'httpd/unix-directory') {
162
						$this->emit('\OC\Files\Cache\Scanner', 'scanFile', [$file, $this->storageId]);
163
						\OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_file', ['path' => $file, 'storage' => $this->storageId]);
164
					}
165
166
					$parent = \dirname($file);
167
					if ($parent === '.' or $parent === '/') {
@@ 235-238 (lines=4) @@
232
					}
233
234
					// post-emit only if it was a file. By that we avoid counting/treating folders as files
235
					if ($data['mimetype'] !== 'httpd/unix-directory') {
236
						$this->emit('\OC\Files\Cache\Scanner', 'postScanFile', [$file, $this->storageId]);
237
						\OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', ['path' => $file, 'storage' => $this->storageId]);
238
					}
239
				} else {
240
					$this->removeFromCache($file);
241
				}