<?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
*
* 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, ...]
*
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));
}
/**
public static function buildCondition(array &$condition = []): string
{
$condition = self::collapseCondition($condition);
-
+
$condition_string = '';
if (count($condition) > 0) {
$condition_string = " WHERE (" . array_shift($condition) . ")";
{
$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 = '';