@@ -110,8 +110,12 @@ |
||
110 | 110 | // Normalise "empty" values into dashes so comparisons are done properly. |
111 | 111 | // This means there is no diference between an empty string and a null |
112 | 112 | // but "0" is considered to be non-empty. |
113 | - if(empty($from) && !strlen($from)) $from = '-'; |
|
114 | - if(empty($to) && !strlen($from)) $to = '-'; |
|
113 | + if(empty($from) && !strlen($from)) { |
|
114 | + $from = '-'; |
|
115 | + } |
|
116 | + if(empty($to) && !strlen($from)) { |
|
117 | + $to = '-'; |
|
118 | + } |
|
115 | 119 | |
116 | 120 | return $this->changes[$title] = array( |
117 | 121 | 'from' => $from, |
@@ -136,10 +136,10 @@ |
||
136 | 136 | */ |
137 | 137 | public function getChangesModificationNeeded() { |
138 | 138 | $filtered = []; |
139 | - foreach ($this->getChanges() as $change => $details) { |
|
140 | - if (array_key_exists('description', $details)) { |
|
139 | + foreach($this->getChanges() as $change => $details) { |
|
140 | + if(array_key_exists('description', $details)) { |
|
141 | 141 | $filtered[$change] = $details; |
142 | - } else if ( |
|
142 | + } else if( |
|
143 | 143 | (array_key_exists('from', $details) || array_key_exists('to', $details)) |
144 | 144 | && $details['from'] !== $details['to'] |
145 | 145 | ) { |
@@ -201,12 +201,16 @@ discard block |
||
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 |
||
260 | 264 | $list = new ArrayList(); |
261 | 265 | $strategy = $this->getDeploymentStrategy(); |
262 | 266 | foreach($strategy->getChanges() as $name => $change) { |
263 | - if(empty($change['to']) || $change['to'] == '-') continue; |
|
267 | + if(empty($change['to']) || $change['to'] == '-') { |
|
268 | + continue; |
|
269 | + } |
|
264 | 270 | |
265 | 271 | $list->push(new ArrayData([ |
266 | 272 | 'Name' => $name, |