Completed
Branch master (e5db64)
by Schlaefer
09:02
created
app/Controller/EntriesController.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,7 +242,8 @@  discard block
 block discarded – undo
242 242
 							$this->_stop();
243 243
 						}
244 244
 					// answering through POST request
245
-					else :
245
+					else {
246
+						:
246 247
 						if ($this->localReferer('action') === 'mix') {
247 248
 							// answer request came from mix ansicht
248 249
 							$this->redirect(
@@ -253,6 +254,7 @@  discard block
 block discarded – undo
253 254
 									'#' => $this->Entry->id
254 255
 								]
255 256
 							);
257
+					}
256 258
 
257 259
 						} else {
258 260
 							// normal posting from entries/add or entries/view
@@ -267,7 +269,8 @@  discard block
 block discarded – undo
267 269
 						}
268 270
 						return;
269 271
 					endif;
270
-				else :
272
+				else {
273
+					:
271 274
 					// Error while trying to save a post
272 275
 					if (count($this->Entry->validationErrors) === 0) {
273 276
 						$this->Session->setFlash(
@@ -276,6 +279,7 @@  discard block
 block discarded – undo
276 279
 							),
277 280
 							'flash/error'
278 281
 						);
282
+				}
279 283
 					}
280 284
 				endif;
281 285
 
@@ -584,10 +588,12 @@  discard block
 block discarded – undo
584 588
 				);
585 589
 				$entry = $this->dic->newInstance('\Saito\Posting\Posting', ['rawData' => $newEntry]);
586 590
 				$this->set('entry', $entry);
587
-			else :
591
+			else {
592
+				:
588 593
 				// validation errors
589 594
 				foreach ($errors as $field => $error) {
590 595
 					$message = __d('nondynamic', $field) . ": " . __d( 'nondynamic', $error[0]);
596
+			}
591 597
 					$this->JsData->addAppJsMessage(
592 598
 						$message,
593 599
 						[
Please login to merge, or discard this patch.
app/Controller/CategoriesController.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,10 @@  discard block
 block discarded – undo
89 89
 						$this->Session->setFlash(__('Error moving category.'),
90 90
 								'flash/error');
91 91
 						$failure = $failure || true;
92
-					else:
92
+					else {
93
+						:
93 94
 						$this->Session->setFlash(__('Category moved.'), 'flash/notice');
95
+					}
94 96
 					endif;
95 97
 				endif;
96 98
 
@@ -99,8 +101,10 @@  discard block
 block discarded – undo
99 101
 					$this->Session->setFlash(__("Error deleting category."),
100 102
 							'flash/error');
101 103
 					$failure = $failure || true;
102
-				else:
104
+				else {
105
+					:
103 106
 					$this->Session->setFlash(__('Category deleted.'), 'flash/notice');
107
+				}
104 108
 				endif;
105 109
 
106 110
 				if ($failure == false) :
Please login to merge, or discard this patch.
app/Controller/Component/CurrentUserComponent.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,8 +305,10 @@
 block discarded – undo
305 305
 
306 306
 			if ($this->isLoggedIn()):
307 307
 				$this->_Controller->Auth->allow();
308
-			else:
308
+			else {
309
+				:
309 310
 				$this->_Controller->Auth->deny();
311
+			}
310 312
 			endif;
311 313
 
312 314
 			$this->_Controller->Auth->autoRedirect = false; // don't redirect after Auth->login()
Please login to merge, or discard this patch.
app/Plugin/SimpleCaptcha/View/Helper/SimpleCaptchaHelper.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
41 41
 	 * @return array 
42 42
 	 */
43 43
   protected function _generate() {
44
-		if ($this->captcha_generated === TRUE) return;
44
+		if ($this->captcha_generated === TRUE) {
45
+			return;
46
+		}
45 47
   	# Choose the first number randomly between 6 and 10. This is to stop the answer being negative.
46 48
 		$numberOne = mt_rand(6, 9);
47 49
   	# Choose the second number randomly between 0 and 5.
Please login to merge, or discard this patch.
app/Config/bootstrap.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,8 +212,10 @@
 block discarded – undo
212 212
  */
213 213
 if ( file_exists(APP . 'Config' . DS . 'installed.txt') ) :
214 214
 	Configure::write('Saito.installed', TRUE);
215
-else :
215
+else {
216
+	:
216 217
 	Configure::write('Saito.installed', FALSE);
218
+}
217 219
 endif;
218 220
 
219 221
 /**
Please login to merge, or discard this patch.
app/View/Helper/FarbtasticHelper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
 
44 44
         if(isset($this->request->data[$model][$fieldname])) {
45 45
             $color_value = str_replace("#", "", $this->request->data[$model][$fieldname]); // expects an RGB string, strips any incoming '#' character
46
-        }
47
-        else {
46
+        } else {
48 47
             $color_value = "000000"; // black
49 48
         }
50 49
 
Please login to merge, or discard this patch.
app/Lib/Saito/User/SaitoUserTrait.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,8 +174,10 @@
 block discarded – undo
174 174
 		protected static function _maxAccessionForUserType($userType) {
175 175
 			if (isset(self::$__accessions[$userType])) :
176 176
 				return self::$__accessions[$userType];
177
-			else :
177
+			else {
178
+				:
178 179
 				return 0;
180
+			}
179 181
 			endif;
180 182
 		}
181 183
 
Please login to merge, or discard this patch.