]> git.joonet.de Git - adminer.git/commitdiff
Fix style
authorJakub Vrana <jakub@vrana.cz>
Sat, 27 Oct 2018 17:38:43 +0000 (19:38 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sat, 27 Oct 2018 17:38:43 +0000 (19:38 +0200)
adminer/drivers/clickhouse.inc.php

index 58a9fc2f83eff6eb708e2e487904b7122418a2d8..4058ce9477d90751278327af0b2acd2fa00c2971 100644 (file)
@@ -12,7 +12,7 @@ if (isset($_GET["clickhouse"])) {
                        @ini_set('track_errors', 1); // @ - may be disabled
                        $file = @file_get_contents("$this->_url/?database=$db", false, stream_context_create(array('http' => array(
                                'method' => 'POST',
-                'content' => $this->is_query_select_like($query) ? ($query.' FORMAT JSONCompact') : $query,
+                               'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
                                'header' => 'Content-type: application/x-www-form-urlencoded',
                                'ignore_errors' => 1, // available since PHP 5.2.10
                        ))));
@@ -43,9 +43,9 @@ if (isset($_GET["clickhouse"])) {
                        return new Min_Result($return);
                }
 
-        function is_query_select_like($query) {
-            return (bool) preg_match('~^(select|show)~i', $query);
-        }
+               function isQuerySelectLike($query) {
+                       return (bool) preg_match('~^(select|show)~i', $query);
+               }
 
                function query($query) {
                        return $this->rootQuery($this->_db, $query);
@@ -122,18 +122,18 @@ if (isset($_GET["clickhouse"])) {
 
 
        class Min_Driver extends Min_SQL {
-        function delete($table, $queryWhere, $limit = 0) {
-            return queries("ALTER TABLE " . table($table) . "DELETE $queryWhere");
-        }
+               function delete($table, $queryWhere, $limit = 0) {
+                       return queries("ALTER TABLE " . table($table) . " DELETE $queryWhere");
+               }
 
-        function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
-            $values = array();
-            foreach ($set as $key => $val) {
-                $values[] = "$key = $val";
-            }
-            $query = "$separator" . implode(",$separator", $values);
-            return queries("ALTER TABLE ".table($table)." UPDATE $query$queryWhere");
-        }
+               function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
+                       $values = array();
+                       foreach ($set as $key => $val) {
+                               $values[] = "$key = $val";
+                       }
+                       $query = $separator . implode(",$separator", $values);
+                       return queries("ALTER TABLE " . table($table) . " UPDATE $query$queryWhere");
+               }
        }
 
        function idf_escape($idf) {
@@ -347,9 +347,9 @@ if (isset($_GET["clickhouse"])) {
                return '';
        }
 
-    function last_id() {
-        return 0; // ClickHouse doesn't have it
-    }
+       function last_id() {
+               return 0; // ClickHouse doesn't have it
+       }
 
        function support($feature) {
                return preg_match("~^(columns|sql|status|table)$~", $feature);