Completed
Pull Request — master (#513)
by Helpful
04:05
created
code/model/jobs/DNDeployment.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
 	 */
202 202
 	public function getFullDeployMessages() {
203 203
 		$strategy = $this->getDeploymentStrategy();
204
-		if ($strategy->getActionCode()!=='full') return null;
204
+		if($strategy->getActionCode() !== 'full') return null;
205 205
 
206 206
 		$changes = $strategy->getChangesModificationNeeded();
207 207
 		$messages = [];
208
-		foreach ($changes as $change => $details) {
209
-			if ($change==='Code version') continue;
208
+		foreach($changes as $change => $details) {
209
+			if($change === 'Code version') continue;
210 210
 
211 211
 			$messages[] = [
212 212
 				'Flag' => sprintf(
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			];
218 218
 		}
219 219
 
220
-		if (empty($messages)) {
220
+		if(empty($messages)) {
221 221
 			$messages[] = [
222 222
 				'Flag' => '',
223 223
 				'Text' => '<i>Environment changes have been made.</i>'
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -201,12 +201,16 @@  discard block
 block discarded – undo
201 201
 	 */
202 202
 	public function getFullDeployMessages() {
203 203
 		$strategy = $this->getDeploymentStrategy();
204
-		if ($strategy->getActionCode()!=='full') return null;
204
+		if ($strategy->getActionCode()!=='full') {
205
+			return null;
206
+		}
205 207
 
206 208
 		$changes = $strategy->getChangesModificationNeeded();
207 209
 		$messages = [];
208 210
 		foreach ($changes as $change => $details) {
209
-			if ($change==='Code version') continue;
211
+			if ($change==='Code version') {
212
+				continue;
213
+			}
210 214
 
211 215
 			$messages[] = [
212 216
 				'Flag' => sprintf(
@@ -260,7 +264,9 @@  discard block
 block discarded – undo
260 264
 		$list = new ArrayList();
261 265
 		$strategy = $this->getDeploymentStrategy();
262 266
 		foreach($strategy->getChanges() as $name => $change) {
263
-			if(empty($change['to'])) continue;
267
+			if(empty($change['to'])) {
268
+				continue;
269
+			}
264 270
 
265 271
 			$list->push(new ArrayData([
266 272
 				'Name' => $name,
Please login to merge, or discard this patch.
code/model/steps/SmokeTestPipelineStep.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 		curl_setopt($ch, CURLOPT_URL, $test['URL']);
128 128
 
129 129
 		// Allow individual tests to override number of attempts
130
-		$attempts = (int) $this->getConfigSetting('Attempts');
130
+		$attempts = (int)$this->getConfigSetting('Attempts');
131 131
 		if(!empty($test['Attempts'])) {
132 132
 			$attempts = $test['Attempts'];
133 133
 		}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 	 */
283 283
 	public function startApproval() {
284 284
 		$this->Status = 'Started';
285
-		$this->log("Starting {$this->Title}...");
285
+		$this->log("starting {$this->Title}...");
286 286
 		// Determine if we should use delayed notification
287 287
 		$recipientGroup = 'all';
288 288
 		if($this->getConfigSetting('RecipientsDelay')) {
Please login to merge, or discard this patch.
code/model/steps/UserConfirmationStep.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 	 */
283 283
 	public function startApproval() {
284 284
 		$this->Status = 'Started';
285
-		$this->log("Starting {$this->Title}...");
285
+		$this->log("starting {$this->Title}...");
286 286
 		// Determine if we should use delayed notification
287 287
 		$recipientGroup = 'all';
288 288
 		if($this->getConfigSetting('RecipientsDelay')) {
Please login to merge, or discard this patch.
code/tasks/DNMigrate1_1to1_2.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Will convert the Filename to the version 1.2 of deploynaut where it
4
- * more or less is exactly is the same as the Name but with .rb
5
- */
3
+	 * Will convert the Filename to the version 1.2 of deploynaut where it
4
+	 * more or less is exactly is the same as the Name but with .rb
5
+	 */
6 6
 class DNMigrate1_1to1_2 extends BuildTask {
7 7
 	/**
8 8
 	 * @param SS_HTTPRequest $request
Please login to merge, or discard this patch.
code/tasks/FilesystemSyncTask.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Surface Filesystem::sync() as a dev task in case CMS has not been included.
4
- */
3
+	 * Surface Filesystem::sync() as a dev task in case CMS has not been included.
4
+	 */
5 5
 class CMSFilesystemSyncTask extends BuildTask {
6 6
 	public function run($request = null) {
7 7
 		Filesystem::sync();
Please login to merge, or discard this patch.
code/model/steps/TriggerDeployStep.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 	 */
283 283
 	public function startApproval() {
284 284
 		$this->Status = 'Started';
285
-		$this->log("Starting {$this->Title}...");
285
+		$this->log("starting {$this->Title}...");
286 286
 		// Determine if we should use delayed notification
287 287
 		$recipientGroup = 'all';
288 288
 		if($this->getConfigSetting('RecipientsDelay')) {
Please login to merge, or discard this patch.
code/backends/DeploymentBackend.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -10,6 +10,7 @@  discard block
 block discarded – undo
10 10
 	 * @param DeploynautLogFile $log
11 11
 	 * @param DNProject $project
12 12
 	 * @param type $leaveMaintenancePage
13
+	 * @return void
13 14
 	 */
14 15
 	public function deploy(DNEnvironment $environment, $sha, DeploynautLogFile $log, DNProject $project, $leaveMaintenancePage = false);
15 16
 
@@ -19,6 +20,7 @@  discard block
 block discarded – undo
19 20
 	 *
20 21
 	 * @param DNDataTransfer $dataTransfer
21 22
 	 * @param DeploynautLogFile $log
23
+	 * @return void
22 24
 	 */
23 25
 	public function dataTransfer(DNDataTransfer $dataTransfer, DeploynautLogFile $log);
24 26
 
@@ -28,6 +30,7 @@  discard block
 block discarded – undo
28 30
 	 * @param DNEnvironment $environment
29 31
 	 * @param DeploynautLogFile $log
30 32
 	 * @param DNProject $project
33
+	 * @return void
31 34
 	 */
32 35
 	public function enableMaintenance(DNEnvironment $environment, DeploynautLogFile $log, DNProject $project);
33 36
 
@@ -37,6 +40,7 @@  discard block
 block discarded – undo
37 40
 	 * @param DNEnvironment $environment
38 41
 	 * @param DeploynautLogFile $log
39 42
 	 * @param DNProject $project
43
+	 * @return void
40 44
 	 */
41 45
 	public function disableMaintenance(DNEnvironment $environment, DeploynautLogFile $log, DNProject $project);
42 46
 
@@ -46,6 +50,7 @@  discard block
 block discarded – undo
46 50
 	 * @param DNEnvironment $environment
47 51
 	 * @param DeploynautLogFile $log
48 52
 	 * @param DNProject $project
53
+	 * @return void
49 54
 	 */
50 55
 	public function ping(DNEnvironment $environment, DeploynautLogFile $log, DNProject $project);
51 56
 
Please login to merge, or discard this patch.
code/backends/PackageCache.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -13,6 +13,7 @@
 block discarded – undo
13 13
 	 * @param string $sha The SHA of the commit to be deployed
14 14
 	 * @param string $repositoryDir The directory where the repository resides
15 15
 	 * @param DeploynautLogFile $log The log to write status output to, including package-generation commands
16
+	 * @return string
16 17
 	 */
17 18
 	public function getPackageFilename(
18 19
 		PackageGenerator $generator,
Please login to merge, or discard this patch.
code/model/PipelineData.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -13,6 +13,7 @@
 block discarded – undo
13 13
 	 * Log message
14 14
 	 *
15 15
 	 * @param string $message The message to log
16
+	 * @return void
16 17
 	 */
17 18
 	public function log($message);
18 19
 }
Please login to merge, or discard this patch.