Code Duplication    Length = 20-20 lines in 2 locations

Sources/Subs-Package.php 2 locations

@@ 1346-1365 (lines=20) @@
1343
					);
1344
				}
1345
			}
1346
			elseif ($actionType == 'create-file')
1347
			{
1348
				if (!mktree(dirname($this_action['destination']), false))
1349
				{
1350
					$temp = dirname($this_action['destination']);
1351
					while (!file_exists($temp) && strlen($temp) > 1)
1352
						$temp = dirname($temp);
1353
1354
					$return[] = array(
1355
						'type' => 'chmod',
1356
						'filename' => $temp
1357
					);
1358
				}
1359
1360
				if (!is_writable($this_action['destination']) && (file_exists($this_action['destination']) || !is_writable(dirname($this_action['destination']))))
1361
					$return[] = array(
1362
						'type' => 'chmod',
1363
						'filename' => $this_action['destination']
1364
					);
1365
			}
1366
			elseif ($actionType == 'require-dir')
1367
			{
1368
				if (!mktree($this_action['destination'], false))
@@ 1403-1422 (lines=20) @@
1400
						'filename' => $this_action['destination']
1401
					);
1402
			}
1403
			elseif ($actionType == 'move-dir' || $actionType == 'move-file')
1404
			{
1405
				if (!mktree(dirname($this_action['destination']), false))
1406
				{
1407
					$temp = dirname($this_action['destination']);
1408
					while (!file_exists($temp) && strlen($temp) > 1)
1409
						$temp = dirname($temp);
1410
1411
					$return[] = array(
1412
						'type' => 'chmod',
1413
						'filename' => $temp
1414
					);
1415
				}
1416
1417
				if (!is_writable($this_action['destination']) && (file_exists($this_action['destination']) || !is_writable(dirname($this_action['destination']))))
1418
					$return[] = array(
1419
						'type' => 'chmod',
1420
						'filename' => $this_action['destination']
1421
					);
1422
			}
1423
			elseif ($actionType == 'remove-dir')
1424
			{
1425
				if (!is_writable($this_action['filename']) && file_exists($this_action['filename']))