diff mbox series

[buildroot-test,1/2] web/funcs.inc.php: fix 'bab_format_sql_filter' indentation

Message ID 20190812144345.26794-2-victor.huesca@bootlin.com
State Accepted
Headers show
Series fix indentation problem and simplify a function | expand

Commit Message

Victor Huesca Aug. 12, 2019, 2:43 p.m. UTC
The 'bab_format_sql_filter' function uses tabs indentation whereas the
overall file uses two spaces. This patch simply replace those tabs by
spaces for consistency.

Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
---
 web/funcs.inc.php | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
diff mbox series

Patch

diff --git a/web/funcs.inc.php b/web/funcs.inc.php
index 7e912c1..9582e50 100644
--- a/web/funcs.inc.php
+++ b/web/funcs.inc.php
@@ -32,29 +32,29 @@  function bab_footer()
 
 function bab_format_sql_filter($db, $filters)
 {
-	$status_map = array(
-		"OK" => 0,
-		"NOK" => 1,
-		"TIMEOUT" => 2,
-	);
+  $status_map = array(
+    "OK" => 0,
+    "NOK" => 1,
+    "TIMEOUT" => 2,
+  );
 
-	$sql_filters = implode(' and ', array_map(
-		function ($v, $k) use ($db, $status_map) {
-			if ($k == "reason")
-				return sprintf("%s like %s", $k, $db->quote_smart($v));
-			else if ($k == "status")
-				return sprintf("%s=%s", $k, $db->quote_smart($status_map[$v]));
-			else
-				return sprintf("%s=%s", $k, $db->quote_smart($v));
-		},
-		$filters,
-		array_keys($filters)
-	));
+  $sql_filters = implode(' and ', array_map(
+    function ($v, $k) use ($db, $status_map) {
+      if ($k == "reason")
+        return sprintf("%s like %s", $k, $db->quote_smart($v));
+      else if ($k == "status")
+        return sprintf("%s=%s", $k, $db->quote_smart($status_map[$v]));
+      else
+        return sprintf("%s=%s", $k, $db->quote_smart($v));
+    },
+    $filters,
+    array_keys($filters)
+  ));
 
-	if (count($filters))
-		return "where " . $sql_filters;
-	else
-		return "";
+  if (count($filters))
+    return "where " . $sql_filters;
+  else
+    return "";
 }
 
 /*