Completed
Push — master ( 5c3586...68bdab )
by Tomáš
02:53
created
src/TournamentGenerator/Round.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 	public function orderGroups() : array {
96 96
 		$groups = $this->getGroups();
97 97
 		usort($groups, static function($a, $b) {
98
-			return $a->getOrder() - $b->getOrder();
98
+			return $a->getOrder()-$b->getOrder();
99 99
 		});
100 100
 		return $groups;
101 101
 	}
Please login to merge, or discard this patch.
src/TournamentGenerator/Containers/ContainerQuery.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
 		// Get initial data
49 49
 		if ($this->topLevelOnly) {
50 50
 			$data = $this->container->getTopLevel();
51
-		}
52
-		else {
51
+		} else {
53 52
 			$data = $this->container->get();
54 53
 		}
55 54
 
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
 					}
65 64
 					$ids[] = $obj->getId();
66 65
 				}
67
-			}
68
-			else {
66
+			} else {
69 67
 				$data = array_unique($data);
70 68
 			}
71 69
 		}
@@ -78,11 +76,9 @@  discard block
 block discarded – undo
78 76
 		// Sorting
79 77
 		if (isset($this->sorter)) {
80 78
 			$data = $this->sorter->sort($data);
81
-		}
82
-		elseif (isset($this->sortClosure)) {
79
+		} elseif (isset($this->sortClosure)) {
83 80
 			uasort($data, $this->sortClosure);
84
-		}
85
-		elseif (isset($this->sortProperty)) {
81
+		} elseif (isset($this->sortProperty)) {
86 82
 			uasort($data, [$this, 'sortByPropertyCallback']);
87 83
 		}
88 84
 
@@ -181,14 +177,12 @@  discard block
 block discarded – undo
181 177
 		$property2 = null;
182 178
 		if (is_object($value1) && isset($value1->$property)) {
183 179
 			$property1 = $value1->$property;
184
-		}
185
-		elseif (is_array($value1) && isset($value1[$property])) {
180
+		} elseif (is_array($value1) && isset($value1[$property])) {
186 181
 			$property1 = $value1[$property];
187 182
 		}
188 183
 		if (is_object($value2) && isset($value2->$property)) {
189 184
 			$property2 = $value2->$property;
190
-		}
191
-		elseif (is_array($value2) && isset($value2[$property])) {
185
+		} elseif (is_array($value2) && isset($value2[$property])) {
192 186
 			$property2 = $value2[$property];
193 187
 		}
194 188
 
Please login to merge, or discard this patch.
src/TournamentGenerator/Helpers/Functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * @return bool
24 24
 	 */
25 25
 	public static function isPowerOf2(int $x) : bool {
26
-		return ($x !== 0) && ($x & ($x - 1)) === 0;
26
+		return ($x !== 0) && ($x&($x-1)) === 0;
27 27
 	}
28 28
 
29 29
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public static function previousPowerOf2(int $x) : int {
49 49
 		// Left bit shift by the bit length of the previous number
50
-		return 1 << (strlen(decbin($x)) - 1);
50
+		return 1 << (strlen(decbin($x))-1);
51 51
 	}
52 52
 
53 53
 	/**
Please login to merge, or discard this patch.