Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
framework/Security/TDbUserManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,8 +123,7 @@  discard block
 block discarded – undo
123 123
 			$user = Prado::createComponent($this->_userClass, $this);
124 124
 			$user->setIsGuest(true);
125 125
 			return $user;
126
-		}
127
-		else
126
+		} else
128 127
 			return $this->_userFactory->createUser($username);
129 128
 	}
130 129
 
@@ -175,8 +174,7 @@  discard block
 block discarded – undo
175 174
 				return $conn->getDbConnection();
176 175
 			else
177 176
 				throw new TConfigurationException('dbusermanager_connectionid_invalid', $connectionID);
178
-		}
179
-		else
177
+		} else
180 178
 			throw new TConfigurationException('dbusermanager_connectionid_required');
181 179
 	}
182 180
 
Please login to merge, or discard this patch.
framework/Security/TAuthorizationRule.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@
 block discarded – undo
99 99
 				{
100 100
 					$this->_everyone = true;
101 101
 					break;
102
-				}
103
-				elseif($user === '?')
102
+				} elseif($user === '?')
104 103
 					$this->_guest = true;
105 104
 				elseif($user === '@')
106 105
 					$this->_authenticated = true;
Please login to merge, or discard this patch.
framework/Collections/TStack.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
 				$this->_d[] = $item;
84 84
 				++$this->_c;
85 85
 			}
86
-		}
87
-		elseif($data !== null)
86
+		} elseif($data !== null)
88 87
 			throw new TInvalidDataTypeException('stack_data_not_iterable');
89 88
 	}
90 89
 
Please login to merge, or discard this patch.
framework/Collections/TPriorityMap.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -365,13 +365,11 @@  discard block
 block discarded – undo
365 365
 			if(!isset($this->_d[$priority])) {
366 366
 				$this->_d[$priority] = [$key => $value];
367 367
 				$this->_o = false;
368
-			}
369
-			else
368
+			} else
370 369
 				$this->_d[$priority][$key] = $value;
371 370
 			$this->_c++;
372 371
 			$this->_fd = null;
373
-		}
374
-		else
372
+		} else
375 373
 			throw new TInvalidOperationException('map_readonly', get_class($this));
376 374
 		return $priority;
377 375
 	}
@@ -413,8 +411,7 @@  discard block
 block discarded – undo
413 411
 						return $value;
414 412
 					}
415 413
 				return null;
416
-			}
417
-			else
414
+			} else
418 415
 			{
419 416
 				$priority = (string)round(TPropertyValue::ensureFloat($priority), $this->_p);
420 417
 				if(isset($this->_d[$priority]) && (isset($this->_d[$priority][$key]) || array_key_exists($key, $this->_d[$priority])))
@@ -428,12 +425,10 @@  discard block
 block discarded – undo
428 425
 					}
429 426
 					$this->_fd = null;
430 427
 					return $value;
431
-				}
432
-				else
428
+				} else
433 429
 					return null;
434 430
 			}
435
-		}
436
-		else
431
+		} else
437 432
 			throw new TInvalidOperationException('map_readonly', get_class($this));
438 433
 	}
439 434
 
@@ -526,15 +521,13 @@  discard block
 block discarded – undo
526 521
 					$this->add($key, $value, $priority);
527 522
 				}
528 523
 			}
529
-		}
530
-		elseif(is_array($data) || $data instanceof \Traversable)
524
+		} elseif(is_array($data) || $data instanceof \Traversable)
531 525
 		{
532 526
 			if($this->getCount() > 0)
533 527
 				$this->clear();
534 528
 			foreach($data as $key => $value)
535 529
 				$this->add($key, $value);
536
-		}
537
-		elseif($data !== null)
530
+		} elseif($data !== null)
538 531
 			throw new TInvalidDataTypeException('map_data_not_iterable');
539 532
 	}
540 533
 
@@ -554,13 +547,11 @@  discard block
 block discarded – undo
554 547
 				foreach($data->itemsAtPriority($priority) as $key => $value)
555 548
 					$this->add($key, $value, $priority);
556 549
 			}
557
-		}
558
-		elseif(is_array($data) || $data instanceof \Traversable)
550
+		} elseif(is_array($data) || $data instanceof \Traversable)
559 551
 		{
560 552
 			foreach($data as $key => $value)
561 553
 				$this->add($key, $value);
562
-		}
563
-		elseif($data !== null)
554
+		} elseif($data !== null)
564 555
 			throw new TInvalidDataTypeException('map_data_not_iterable');
565 556
 	}
566 557
 
Please login to merge, or discard this patch.
framework/Collections/TPriorityList.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -391,8 +391,7 @@  discard block
 block discarded – undo
391 391
 			}
392 392
 			$this->removeAtIndexInPriority($p[1], $p[0]);
393 393
 			return $p[2];
394
-		}
395
-		else
394
+		} else
396 395
 			throw new TInvalidDataValueException('list_item_inexistent');
397 396
 	}
398 397
 
@@ -676,14 +675,12 @@  discard block
 block discarded – undo
676 675
 				foreach($data->itemsAtPriority($priority) as $index => $item)
677 676
 					$this->insertAtIndexInPriority($item, false, $priority);
678 677
 			}
679
-		}
680
-		elseif(is_array($data) || $data instanceof \Traversable)
678
+		} elseif(is_array($data) || $data instanceof \Traversable)
681 679
 		{
682 680
 			foreach($data as $priority => $item)
683 681
 				$this->add($item);
684 682
 
685
-		}
686
-		elseif($data !== null)
683
+		} elseif($data !== null)
687 684
 			throw new TInvalidDataTypeException('map_data_not_iterable');
688 685
 	}
689 686
 
Please login to merge, or discard this patch.
framework/Collections/TList.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -162,11 +162,9 @@  discard block
 block discarded – undo
162 162
 			{
163 163
 				array_splice($this->_d, $index, 0, [$item]);
164 164
 				$this->_c++;
165
-			}
166
-			else
165
+			} else
167 166
 				throw new TInvalidDataValueException('list_index_invalid', $index);
168
-		}
169
-		else
167
+		} else
170 168
 			throw new TInvalidOperationException('list_readonly', get_class($this));
171 169
 	}
172 170
 
@@ -187,11 +185,9 @@  discard block
 block discarded – undo
187 185
 			{
188 186
 				$this->removeAt($index);
189 187
 				return $index;
190
-			}
191
-			else
188
+			} else
192 189
 				throw new TInvalidDataValueException('list_item_inexistent');
193
-		}
194
-		else
190
+		} else
195 191
 			throw new TInvalidOperationException('list_readonly', get_class($this));
196 192
 	}
197 193
 
@@ -217,11 +213,9 @@  discard block
 block discarded – undo
217 213
 					array_splice($this->_d, $index, 1);
218 214
 					return $item;
219 215
 				}
220
-			}
221
-			else
216
+			} else
222 217
 				throw new TInvalidDataValueException('list_index_invalid', $index);
223
-		}
224
-		else
218
+		} else
225 219
 			throw new TInvalidOperationException('list_readonly', get_class($this));
226 220
 	}
227 221
 
@@ -275,8 +269,7 @@  discard block
 block discarded – undo
275 269
 			$this->insertAt($index, $item);
276 270
 
277 271
 			return $index;
278
-		}
279
-		else
272
+		} else
280 273
 			throw new TInvalidOperationException('list_readonly', get_class($this));
281 274
 	}
282 275
 
@@ -299,8 +292,7 @@  discard block
 block discarded – undo
299 292
 			$this->insertAt($index + 1, $item);
300 293
 
301 294
 			return $index + 1;
302
-		}
303
-		else
295
+		} else
304 296
 			throw new TInvalidOperationException('list_readonly', get_class($this));
305 297
 	}
306 298
 
@@ -326,8 +318,7 @@  discard block
 block discarded – undo
326 318
 				$this->clear();
327 319
 			foreach($data as $item)
328 320
 				$this->add($item);
329
-		}
330
-		elseif($data !== null)
321
+		} elseif($data !== null)
331 322
 			throw new TInvalidDataTypeException('list_data_not_iterable');
332 323
 	}
333 324
 
@@ -343,8 +334,7 @@  discard block
 block discarded – undo
343 334
 		{
344 335
 			foreach($data as $item)
345 336
 				$this->add($item);
346
-		}
347
-		elseif($data !== null)
337
+		} elseif($data !== null)
348 338
 			throw new TInvalidDataTypeException('list_data_not_iterable');
349 339
 	}
350 340
 
Please login to merge, or discard this patch.
framework/Collections/TMap.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -170,11 +170,9 @@  discard block
 block discarded – undo
170 170
 				$value = $this->_d[$key];
171 171
 				unset($this->_d[$key]);
172 172
 				return $value;
173
-			}
174
-			else
173
+			} else
175 174
 				return null;
176
-		}
177
-		else
175
+		} else
178 176
 			throw new TInvalidOperationException('map_readonly', get_class($this));
179 177
 	}
180 178
 
@@ -218,8 +216,7 @@  discard block
 block discarded – undo
218 216
 				$this->clear();
219 217
 			foreach($data as $key => $value)
220 218
 				$this->add($key, $value);
221
-		}
222
-		elseif($data !== null)
219
+		} elseif($data !== null)
223 220
 			throw new TInvalidDataTypeException('map_data_not_iterable');
224 221
 	}
225 222
 
@@ -235,8 +232,7 @@  discard block
 block discarded – undo
235 232
 		{
236 233
 			foreach($data as $key => $value)
237 234
 				$this->add($key, $value);
238
-		}
239
-		elseif($data !== null)
235
+		} elseif($data !== null)
240 236
 			throw new TInvalidDataTypeException('map_data_not_iterable');
241 237
 	}
242 238
 
Please login to merge, or discard this patch.
framework/Collections/TPagedList.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -186,22 +186,18 @@  discard block
 block discarded – undo
186 186
 					$this->_currentPageIndex = $pageIndex;
187 187
 					$this->onPageIndexChanged(new TPagedListPageChangedEventParameter($oldPage));
188 188
 					return $pageIndex;
189
-				}
190
-				else
189
+				} else
191 190
 					return false;
192
-			}
193
-			else
191
+			} else
194 192
 				return false;
195
-		}
196
-		else
193
+		} else
197 194
 		{
198 195
 			if($pageIndex >= 0 && $pageIndex < $this->getPageCount())
199 196
 			{
200 197
 				$this->_currentPageIndex = $pageIndex;
201 198
 				$this->onPageIndexChanged(null);
202 199
 				return $pageIndex;
203
-			}
204
-			else
200
+			} else
205 201
 				return false;
206 202
 		}
207 203
 	}
@@ -253,8 +249,7 @@  discard block
 block discarded – undo
253 249
 				return (int)(($this->_virtualCount + $this->_pageSize - 1) / $this->_pageSize);
254 250
 			else
255 251
 				return -1;
256
-		}
257
-		else
252
+		} else
258 253
 			return (int)((parent::getCount() + $this->_pageSize - 1) / $this->_pageSize);
259 254
 	}
260 255
 
Please login to merge, or discard this patch.
framework/Collections/TQueue.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
 				$this->_d[] = $item;
85 85
 				++$this->_c;
86 86
 			}
87
-		}
88
-		elseif($data !== null)
87
+		} elseif($data !== null)
89 88
 			throw new TInvalidDataTypeException('queue_data_not_iterable');
90 89
 	}
91 90
 
Please login to merge, or discard this patch.