Passed
Push — master ( 4ada5b...453afa )
by Richard
02:12
created
Maphper/Lib/Sql/In.php 3 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -2,28 +2,28 @@
 block discarded – undo
2 2
 namespace Maphper\Lib\Sql;
3 3
 
4 4
 class In implements WhereConditional {
5
-    public function matches($key, $value, $mode) {
6
-        return !is_numeric($key) && is_array($value);
7
-    }
5
+	public function matches($key, $value, $mode) {
6
+		return !is_numeric($key) && is_array($value);
7
+	}
8 8
 
9
-    public function getSql($key, $value, $mode) {
10
-        $args = [];
11
-        $inSql = [];
12
-        $count = count($value);
13
-        $value = array_values($value); // fix numeric index being different than $i
14
-        for ($i = 0; $i < $count; $i++) {
15
-            $args[$key . $i] = $value[$i];
16
-            $inSql[] = ':' . $key . $i;
17
-        }
9
+	public function getSql($key, $value, $mode) {
10
+		$args = [];
11
+		$inSql = [];
12
+		$count = count($value);
13
+		$value = array_values($value); // fix numeric index being different than $i
14
+		for ($i = 0; $i < $count; $i++) {
15
+			$args[$key . $i] = $value[$i];
16
+			$inSql[] = ':' . $key . $i;
17
+		}
18 18
 
19
-        $notText = '';
20
-        if (\Maphper\Maphper::FIND_NOT & $mode) {
21
-            $notText = ' NOT';
22
-        }
19
+		$notText = '';
20
+		if (\Maphper\Maphper::FIND_NOT & $mode) {
21
+			$notText = ' NOT';
22
+		}
23 23
 
24
-        if (count($inSql) == 0) return ['args' => [], 'sql' => ''];
25
-        else $sql = [$key . $notText . ' IN ( ' .  implode(', ', $inSql) . ')'];
24
+		if (count($inSql) == 0) return ['args' => [], 'sql' => ''];
25
+		else $sql = [$key . $notText . ' IN ( ' .  implode(', ', $inSql) . ')'];
26 26
 
27
-        return ['args' => $args, 'sql' => $sql];
28
-    }
27
+		return ['args' => $args, 'sql' => $sql];
28
+	}
29 29
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         }
23 23
 
24 24
         if (count($inSql) == 0) return ['args' => [], 'sql' => ''];
25
-        else $sql = [$key . $notText . ' IN ( ' .  implode(', ', $inSql) . ')'];
25
+        else $sql = [$key . $notText . ' IN ( ' . implode(', ', $inSql) . ')'];
26 26
 
27 27
         return ['args' => $args, 'sql' => $sql];
28 28
     }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,11 @@
 block discarded – undo
21 21
             $notText = ' NOT';
22 22
         }
23 23
 
24
-        if (count($inSql) == 0) return ['args' => [], 'sql' => ''];
25
-        else $sql = [$key . $notText . ' IN ( ' .  implode(', ', $inSql) . ')'];
24
+        if (count($inSql) == 0) {
25
+        	return ['args' => [], 'sql' => ''];
26
+        } else {
27
+        	$sql = [$key . $notText . ' IN ( ' .  implode(', ', $inSql) . ')'];
28
+        }
26 29
 
27 30
         return ['args' => $args, 'sql' => $sql];
28 31
     }
Please login to merge, or discard this patch.