diff -u b/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php --- b/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -1176,7 +1176,7 @@ } /** - * Retrieves an unique ID from a given sequence. + * Retrieves a unique ID from a given sequence. * * Use this function if for some reason you can't use a serial field. For * example, MySQL has no ways of reading of the current value of a sequence @@ -1184,7 +1184,7 @@ * value. Or sometimes you just need a unique integer. * * @param $existing_id - Maximum existing id + * This must be a Maximum existing ID. * After a database import, it might be that the sequences table is behind, * so by passing in the maximum existing id, it can be assured that we * never issue the same id. diff -u b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php --- b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php @@ -147,7 +147,6 @@ $this->query('CREATE TEMPORARY TABLE {' . $tablename . '} Engine=MEMORY ' . $query, $args, $options); return $tablename; } - /** * {@inheritdoc} */ diff -u b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php --- b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php @@ -35,15 +35,11 @@ /** * Get information about the table name and database from the prefix. * - * @param - * Name of table to look prefix up for. Defaults to 'default' because that's - * default key for prefix. - * @param $add_prefix - * Boolean that indicates whether the given table name should be prefixed. - * * @param string $table + * Name of table to look prefix up for. Defaults to 'default' because that's + * default key for prefix. * @param bool $add_prefix - * + * Boolean that indicates whether the given table name should be prefixed. * @return array * A keyed array with information about the database, table name and prefix. */ @@ -84,12 +80,11 @@ /** * Generate SQL to create a new table from a Drupal schema definition. * - * @param string $name + * @param $name * The name of the table to create. - * @param array $table + * @param $table * A Schema API table definition array. - * - * @return string[] + * @return * An array of SQL statements to create the table. */ protected function createTableSql($name, $table) { @@ -146,7 +141,7 @@ * The field specification, as per the schema data structure format. * * @return string - * The Generated SQL string. + * The generated SQL string. */ protected function createFieldSql($name, $spec) { $sql = "`" . $name . "` " . $spec['mysql_type']; diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php @@ -22,7 +22,7 @@ class Connection extends DatabaseConnection { /** - * The name by which to obtain a lock for retrieve the next insert ID. + * The name used to obtain a lock to retrieve the next insert ID. */ const POSTGRESQL_NEXTID_LOCK = 1000; @@ -185,7 +185,6 @@ $this->query('CREATE TEMPORARY TABLE {' . $tablename . '} AS ' . $query, $args, $options); return $tablename; } - /** * {@inheritdoc} */ @@ -253,7 +252,8 @@ * @return * An integer number larger than any number returned by earlier calls and * also larger than $existing if one was passed in. - */ + */ + public function nextId($existing = 0) { // Retrieve the name of the sequence. This information cannot be cached diff -u b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -188,7 +188,6 @@ * The name of the table to create. * @param array $table * A Schema API table definition array. - * * @return string[] * An array of SQL statements to create the table. */ @@ -377,14 +376,13 @@ ); return $map; } - /** * Generates SQL from field definitions. * * @param array $fields * Array of field definitions. Each array value is either: - * - a field name (string), - * - an array of two strings, array($field_name, $alias). + * - A field name (string). + * - An array containing the field name and field alias. * * @return string * The generated SQL snippet. @@ -449,7 +447,9 @@ $prefixInfo = $this->getPrefixInfo($new_name); $this->connection->query('ALTER TABLE {' . $table . '} RENAME TO ' . $prefixInfo['table']); } - + /** + * {@inheritdoc} + */ public function copyTable($source, $destination) { // @TODO The server is likely going to rename indexes and constraints // during the copy process, and it will not match our @@ -713,14 +713,16 @@ } /** + * Generates Index SQL from field definitions. + * * @param string $table * The table on which the index will be created. * @param string $name * An identifying name for this index. * @param array $fields * Array of field definitions. Each array value is either - * - a field name (string), or - * - an array of two strings, array($field_name, $alias). + * - A field name (string). + * - An array containing the field name and field alias. * * @return string * The generated SQL snippet. @@ -754,6 +756,9 @@ * The database table to return comments for. * @param $column * (optional) A column in $table to return comments for. + * + * @return string + * The generated SQL string. */ public function getComment($table, $column = NULL) { $info = $this->getPrefixInfo($table); diff -u b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php --- b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php @@ -16,9 +16,11 @@ use Drupal\Core\Database\Connection as DatabaseConnection; /** - * SQLite implementation of DatabaseConnection::prepare(). SQLite implementation of - * \Drupal\Core\Database\Connection::prepare(). - */ + * @addtogroup database + * @{ + * SQLite implementation of DatabaseConnection::prepare(). SQLite implementation of + * \Drupal\Core\Database\Connection::prepare(). + */ class Connection extends DatabaseConnection { /** @@ -100,7 +102,6 @@ $version = $this->query('SELECT sqlite_version()')->fetchField(); $this->savepointSupport = (version_compare($version, '3.6.8') >= 0); } - /** * {@inheritdoc} */ @@ -177,7 +178,8 @@ * @param mixed $expr2 * (optional) Returned if $condition results to FALSE. * - * @return + * @return string + * The generated SQL string. */ public static function sqlFunctionIf($condition, $expr1, $expr2 = NULL) { return $condition ? $expr1 : $expr2;