]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/DBA.php
Merge pull request #12946 from friendica/api-permission
[friendica.git] / src / Database / DBA.php
index 3b814650573f43fe16d6e9c71bc44977dd5feb95..e29cd30386848b465afc2f9446dc3f0c9864758e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -517,7 +517,7 @@ class DBA
         * Build the table query substring from one or more tables, with or without a schema.
         *
         * Expected formats:
-        * - table
+        * - [table]
         * - [table1, table2, ...]
         * - [schema1 => table1, schema2 => table2, table3, ...]
         *
@@ -527,7 +527,7 @@ class DBA
        public static function buildTableString(array $tables): string
        {
                // Quote each entry
-               return implode(',', array_map(['self', 'quoteIdentifier'], $tables));
+               return implode(',', array_map([self::class, 'quoteIdentifier'], $tables));
        }
 
        /**
@@ -568,7 +568,7 @@ class DBA
        public static function buildCondition(array &$condition = []): string
        {
                $condition = self::collapseCondition($condition);
-               
+
                $condition_string = '';
                if (count($condition) > 0) {
                        $condition_string = " WHERE (" . array_shift($condition) . ")";
@@ -717,7 +717,7 @@ class DBA
        {
                $groupby_string = '';
                if (!empty($params['group_by'])) {
-                       $groupby_string = " GROUP BY " . implode(', ', array_map(['self', 'quoteIdentifier'], $params['group_by']));
+                       $groupby_string = " GROUP BY " . implode(', ', array_map([self::class, 'quoteIdentifier'], $params['group_by']));
                }
 
                $order_string = '';