Code Duplication    Length = 11-11 lines in 2 locations

code/model/SiteTreeLinkTracking.php 2 locations

@@ 306-316 (lines=11) @@
303
304
			// Link to a file on this site.
305
			$matches = array();
306
			if(preg_match('/\[file_link(?:\s*|%20|,)?id=([0-9]+)\]/i', $href, $matches)) {
307
				$results[] = array(
308
					'Type' => 'file',
309
					'Target' => $matches[1],
310
					'Anchor' => null,
311
					'DOMReference' => $link,
312
					'Broken' => !DataObject::get_by_id('File', $matches[1])
313
				);
314
315
				continue;
316
			}
317
318
			// Local anchor.
319
			$matches = array();
@@ 320-330 (lines=11) @@
317
318
			// Local anchor.
319
			$matches = array();
320
			if(preg_match('/^#(.*)/i', $href, $matches)) {
321
				$results[] = array(
322
					'Type' => 'localanchor',
323
					'Target' => null,
324
					'Anchor' => $matches[1],
325
					'DOMReference' => $link,
326
					'Broken' => !preg_match("#(name|id)=\"{$matches[1]}\"#", $htmlValue->getContent())
327
				);
328
329
				continue;
330
			}
331
332
		}
333