Code Duplication    Length = 6-6 lines in 2 locations

Sources/Packages.php 2 locations

@@ 379-384 (lines=6) @@
376
				foreach ($mod_actions as $key => $mod_action)
377
				{
378
					// Lets get the last section of the file name.
379
					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php')
380
						$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
381
					elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches))
382
						$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
383
					else
384
						$actual_filename = $key;
385
386
					if ($mod_action['type'] == 'opened')
387
						$failed = false;
@@ 464-469 (lines=6) @@
461
				foreach ($mod_actions as $operation_key => $mod_action)
462
				{
463
					// Lets get the last section of the file name.
464
					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php')
465
						$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
466
					elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches))
467
						$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
468
					else
469
						$actual_filename = $key;
470
471
					// We just need it for actual parse changes.
472
					if (!in_array($mod_action['type'], array('error', 'result', 'opened', 'saved', 'end', 'missing', 'skipping', 'chmod')))