Code Duplication    Length = 10-11 lines in 3 locations

code/model/jobs/DNGitFetch.php 1 location

@@ 61-70 (lines=10) @@
58
			$this->DeployerID = Member::currentUserID();
59
		}
60
61
		if($this->DeployerID) {
62
			$deployer = $this->Deployer();
63
			$message = sprintf(
64
				'Update repository job for %s initiated by %s (%s)',
65
				$project->Name,
66
				$deployer->getName(),
67
				$deployer->Email
68
			);
69
			$log->write($message);
70
		}
71
72
		// write first, so we have the ID. We have to write again
73
		// later once we have the resque token.

code/model/jobs/DNPing.php 1 location

@@ 114-123 (lines=10) @@
111
			$this->DeployerID = Member::currentUserID();
112
		}
113
114
		if($this->DeployerID) {
115
			$deployer = $this->Deployer();
116
			$message = sprintf(
117
				'Ping to %s initiated by %s (%s)',
118
				$environment->getFullName(),
119
				$deployer->getName(),
120
				$deployer->Email
121
			);
122
			$log->write($message);
123
		}
124
125
		$token = Resque::enqueue('deploy', 'PingJob', $args, true);
126
		$this->ResqueToken = $token;

tests/PipelineTest.php 1 location

@@ 172-182 (lines=11) @@
169
			$this->DeployerID = Member::currentUserID();
170
		}
171
172
		if($this->DeployerID) {
173
			$deployer = $this->Deployer();
174
			$message = sprintf(
175
				'Deploy to %s:%s initiated by %s (%s)',
176
				$project->Name,
177
				$environment->Name,
178
				$deployer->getName(),
179
				$deployer->Email
180
			);
181
			$log->write($message);
182
		}
183
184
		return 'dummytoken';
185
	}