Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
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.
framework/TPropertyValue.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -124,11 +124,9 @@  discard block
 block discarded – undo
124 124
 			{
125 125
 				eval('$array=array' . $value . ';');
126 126
 				return $array;
127
-			}
128
-			else
127
+			} else
129 128
 				return $len > 0?[$value]:[];
130
-		}
131
-		else
129
+		} else
132 130
 			return (array)$value;
133 131
 	}
134 132
 
@@ -171,8 +169,7 @@  discard block
 block discarded – undo
171 169
 				throw new TInvalidDataValueException(
172 170
 					'propertyvalue_enumvalue_invalid', $value,
173 171
 						implode(' | ', $types[$enums]->getConstants()));
174
-		}
175
-		elseif(!is_array($enums))
172
+		} elseif(!is_array($enums))
176 173
 		{
177 174
 			$enums = func_get_args();
178 175
 			array_shift($enums);
Please login to merge, or discard this patch.
framework/Web/THttpResponse.php 1 patch
Braces   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		$status = TPropertyValue::ensureInteger($status);
284 284
 		if(isset(self::$HTTP_STATUS_CODES[$status])) {
285 285
 			$this->_reason = self::$HTTP_STATUS_CODES[$status];
286
-		}else{
286
+		} else{
287 287
 			if($reason === null || $reason === '') {
288 288
 				throw new TInvalidDataValueException("response_status_reason_missing");
289 289
 			}
@@ -379,8 +379,7 @@  discard block
 block discarded – undo
379 379
 		{
380 380
 			foreach($headers as $h)
381 381
 				header($h);
382
-		}
383
-		else
382
+		} else
384 383
 		{
385 384
 			header('Pragma: public');
386 385
 			header('Expires: 0');
@@ -505,13 +504,11 @@  discard block
 block discarded – undo
505 504
 				{
506 505
 					$this->_bufferOutput = false;
507 506
 					ob_end_flush();
508
-				}
509
-				else
507
+				} else
510 508
 					ob_flush();
511 509
 				flush();
512 510
 			}
513
-		}
514
-		else
511
+		} else
515 512
 			flush();
516 513
 	}
517 514
 
@@ -659,8 +656,7 @@  discard block
 block discarded – undo
659 656
 				$cookie->getSecure(),
660 657
 				$cookie->getHttpOnly()
661 658
 			);
662
-		}
663
-		else {
659
+		} else {
664 660
 			setcookie(
665 661
 				$cookie->getName(),
666 662
 				$cookie->getValue(),
Please login to merge, or discard this patch.