Code Duplication    Length = 13-13 lines in 2 locations

code/jobs/DataTransferJob.php 1 location

@@ 64-76 (lines=13) @@
61
                ))
62
                ->exclude('ID', $dataTransfer->ID);
63
64
            if ($runningTransfers->count()) {
65
                $runningTransfer = $runningTransfers->first();
66
                $log->write(sprintf(
67
                    '[-] Error: another transfer is in progress (started at %s by %s)',
68
                    $runningTransfer->dbObject('Created')->Nice(),
69
                    $runningTransfer->Author()->Title
70
                ));
71
                throw new RuntimeException(sprintf(
72
                    'Another transfer is in progress (started at %s by %s)',
73
                    $runningTransfer->dbObject('Created')->Nice(),
74
                    $runningTransfer->Author()->Title
75
                ));
76
            }
77
78
79
            // before we push data to an environment, we'll make a backup first

code/jobs/DeployJob.php 1 location

@@ 44-56 (lines=13) @@
41
                ))
42
                ->exclude('ID', $this->args['deploymentID']);
43
44
            if ($runningDeployments->count()) {
45
                $runningDeployment = $runningDeployments->first();
46
                $log->write(sprintf(
47
                    '[-] Error: another deployment is in progress (started at %s by %s)',
48
                    $runningDeployment->dbObject('Created')->Nice(),
49
                    $runningDeployment->Deployer()->Title
50
                ));
51
                throw new RuntimeException(sprintf(
52
                    'Another deployment is in progress (started at %s by %s)',
53
                    $runningDeployment->dbObject('Created')->Nice(),
54
                    $runningDeployment->Deployer()->Title
55
                ));
56
            }
57
58
            $DNEnvironment->Backend()->deploy(
59
                $DNEnvironment,