Passed
Push — master ( 0c776b...af5b28 )
by Ron
02:31
created
src/Builder/Internal/ConditionBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@  discard block
 block discarded – undo
14 14
 	 * @return string
15 15
 	 */
16 16
 	public static function build(Database $db, string $query, array $conditions, string $token): string {
17
-		if(!count($conditions)) {
17
+		if (!count($conditions)) {
18 18
 			return $query;
19 19
 		}
20 20
 		$query .= "{$token}\n";
21 21
 		$arr = [];
22
-		foreach($conditions as [$expression, $arguments]) {
23
-			if(is_array($expression)) {
24
-				foreach($expression as $key => $value) {
22
+		foreach ($conditions as [$expression, $arguments]) {
23
+			if (is_array($expression)) {
24
+				foreach ($expression as $key => $value) {
25 25
 					$key = self::formatKey($key);
26
-					if($value === null) {
26
+					if ($value === null) {
27 27
 						$arr = self::buildCondition($arr, "ISNULL({$key})", [$value], $db);
28 28
 					} else {
29 29
 						$arr = self::buildCondition($arr, "{$key}=?", [$value], $db);
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 	 * @return string
56 56
 	 */
57 57
 	private static function formatKey(string $key): string {
58
-		if(strpos($key, '`') !== false || strpos($key, '(') !== false) {
58
+		if (strpos($key, '`') !== false || strpos($key, '(') !== false) {
59 59
 			return $key;
60 60
 		}
61 61
 		$keyParts = explode('.', $key);
62
-		$fn = static function (string $part) {
62
+		$fn = static function(string $part) {
63 63
 			return "`{$part}`";
64 64
 		};
65 65
 		$enclosedKeyParts = array_map($fn, $keyParts);
Please login to merge, or discard this patch.