X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDatabase%2FDBA.php;h=e29cd30386848b465afc2f9446dc3f0c9864758e;hb=493e4ed9fb24ab82632e0aac1214c33362e793b4;hp=9ce2b61473c30e528f233ee9fbb70bf05302c120;hpb=e3aed8099c1605e1b15b70f74b94540f4512c829;p=friendica.git diff --git a/src/Database/DBA.php b/src/Database/DBA.php index 9ce2b61473..e29cd30386 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -1,6 +1,6 @@ table1, schema2 => table2, table3, ...] * @@ -527,13 +527,13 @@ 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)); } /** - * Escape an identifier (table or field name) optional with a schema like (schema.)table + * Escape an identifier (table or field name) optional with a schema like ((schema.)table.)field * - * @param $identifier Table, field name + * @param string $identifier Table, field name * @return string Quotes table or field name */ public static function quoteIdentifier(string $identifier): string @@ -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 = '';