Code Duplication    Length = 11-11 lines in 2 locations

code/model/SiteTreeLinkTracking.php 2 locations

@@ 287-297 (lines=11) @@
284
285
			// Link to a file on this site.
286
			$matches = array();
287
			if(preg_match('/\[file_link(?:\s*|%20|,)?id=([0-9]+)\]/i', $href, $matches)) {
288
				$results[] = array(
289
					'Type' => 'file',
290
					'Target' => $matches[1],
291
					'Anchor' => null,
292
					'DOMReference' => $link,
293
					'Broken' => !DataObject::get_by_id('File', $matches[1])
294
				);
295
296
				continue;
297
			}
298
299
			// Local anchor.
300
			$matches = array();
@@ 301-311 (lines=11) @@
298
299
			// Local anchor.
300
			$matches = array();
301
			if(preg_match('/^#(.*)/i', $href, $matches)) {
302
				$results[] = array(
303
					'Type' => 'localanchor',
304
					'Target' => null,
305
					'Anchor' => $matches[1],
306
					'DOMReference' => $link,
307
					'Broken' => !preg_match("#(name|id)=\"{$matches[1]}\"#", $htmlValue->getContent())
308
				);
309
310
				continue;
311
			}
312
313
		}
314