@@ -74,7 +74,9 @@ discard block |
||
74 | 74 | } elseif(!$tests && $defaultTests) { |
75 | 75 | $tests = $defaultTests; |
76 | 76 | } |
77 | - if($tests) return $tests; |
|
77 | + if($tests) { |
|
78 | + return $tests; |
|
79 | + } |
|
78 | 80 | |
79 | 81 | // if there's no tests to check for, fallback to trying to find the |
80 | 82 | // site's homepage by looking at the DNEnvironment fields. |
@@ -126,7 +128,9 @@ discard block |
||
126 | 128 | |
127 | 129 | // Allow individual tests to override number of attempts |
128 | 130 | $attempts = (int) $this->getConfigSetting('Attempts'); |
129 | - if(!empty($test['Attempts'])) $attempts = $test['Attempts']; |
|
131 | + if(!empty($test['Attempts'])) { |
|
132 | + $attempts = $test['Attempts']; |
|
133 | + } |
|
130 | 134 | |
131 | 135 | // Run through each attempt |
132 | 136 | for($i = 0; $i < $attempts; $i++) { |
@@ -189,7 +193,9 @@ discard block |
||
189 | 193 | } |
190 | 194 | |
191 | 195 | // Run out of re-attempts |
192 | - if($attempts > 1) $this->log("Failed after {$attempts} attempts"); |
|
196 | + if($attempts > 1) { |
|
197 | + $this->log("Failed after {$attempts} attempts"); |
|
198 | + } |
|
193 | 199 | return false; |
194 | 200 | } |
195 | 201 |
@@ -103,7 +103,9 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function StartDeployment() { |
105 | 105 | $this->Status = 'Started'; |
106 | - if (!$this->Started) $this->Started = SS_Datetime::now()->Rfc2822(); |
|
106 | + if (!$this->Started) { |
|
107 | + $this->Started = SS_Datetime::now()->Rfc2822(); |
|
108 | + } |
|
107 | 109 | $this->log("Starting {$this->Title}..."); |
108 | 110 | $this->write(); |
109 | 111 | return true; |
@@ -111,7 +113,9 @@ discard block |
||
111 | 113 | |
112 | 114 | public function getRunningDescription() { |
113 | 115 | // Don't show options if this step has already been confirmed |
114 | - if($this->Deployed) return; |
|
116 | + if($this->Deployed) { |
|
117 | + return; |
|
118 | + } |
|
115 | 119 | |
116 | 120 | return _t('TriggerDeployStep.RUNNINGDESCRIPTION', |
117 | 121 | 'Please press the "Deploy" button to continue deployment'); |
@@ -179,7 +179,9 @@ discard block |
||
179 | 179 | } |
180 | 180 | |
181 | 181 | // Skip subsequent approvals if already approved / rejected |
182 | - if($this->hasResponse()) return; |
|
182 | + if($this->hasResponse()) { |
|
183 | + return; |
|
184 | + } |
|
183 | 185 | |
184 | 186 | // Approve |
185 | 187 | $this->Approval = 'Approved'; |
@@ -205,7 +207,9 @@ discard block |
||
205 | 207 | } |
206 | 208 | |
207 | 209 | // Skip subsequent approvals if already approved / rejected |
208 | - if($this->hasResponse()) return; |
|
210 | + if($this->hasResponse()) { |
|
211 | + return; |
|
212 | + } |
|
209 | 213 | |
210 | 214 | // Reject |
211 | 215 | $this->Approval = 'Rejected'; |
@@ -363,7 +367,9 @@ discard block |
||
363 | 367 | public function getRunningDescription() { |
364 | 368 | |
365 | 369 | // Don't show options if this step has already been confirmed |
366 | - if($this->hasResponse() || !$this->isRunning()) return; |
|
370 | + if($this->hasResponse() || !$this->isRunning()) { |
|
371 | + return; |
|
372 | + } |
|
367 | 373 | |
368 | 374 | return 'This deployment is currently awaiting approval before it can complete.'; |
369 | 375 | } |