8000 Documentation and code styling fixes by BenMorel · Pull Request #841 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Documentation and code styling fixes #841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ public function transactional(Closure $func)
$func($this);
$this->commit();
} catch (Exception $e) {
$this->rollback();
$this->rollBack();
throw $e;
}
}
Expand Down Expand Up @@ -1268,7 +1268,7 @@ public function rollBack()
$logger->startQuery('"ROLLBACK"');
}
$this->_transactionNestingLevel = 0;
$this->_conn->rollback();
$this->_conn->rollBack();
$this->_isRollbackOnly = false;
if ($logger) {
$logger->stopQuery();
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class Connection extends PDOConnection implements \Doctrine\DBAL\Driver\Connection
{
/**
* @override
* {@inheritDoc}
*/
public function quote($value, $type=\PDO::PARAM_STR)
{
Expand Down
5 changes: 3 additions & 2 deletions lib/Doctrine/DBAL/DriverManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ private static function _checkParams(array $params)
*
* @param array $params The list of parameters.
*
* @param array A modified list of parameters with info from a database
* URL extracted into indidivual parameter parts.
* @return array A modified list of parameters with info from a database
* URL extracted into indidivual parameter parts.
*
* @throws DBALException
*/
private static function parseDatabaseUrl(array $params)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Id/TableGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function nextValue($sequenceName)
$this->conn->commit();

} catch (\Exception $e) {
$this->conn->rollback();
$this->conn->rollBack();
throw new \Doctrine\DBAL\DBALException("Error occurred while generating ID with TableGenerator, aborted generation: " . $e->getMessage(), 0, $e);
}

Expand Down
1 change: 0 additions & 1 deletion lib/Doctrine/DBAL/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
namespace Doctrine\DBAL\Platforms;

use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\Identifier;
use Doctrine\DBAL\Schema\Index;
Expand Down
9 changes: 9 additions & 0 deletions lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ class MySqlPlatform extends AbstractPlatform
/**
* Adds MySQL-specific LIMIT clause to the query
* 18446744073709551615 is 2^64-1 maximum of unsigned BIGINT the biggest limit possible
*
* @param string $query
* @param integer $limit
* @param integer $offset
*
* @return string
*/
protected function doModifyLimitQuery($query, $limit, $offset)
{
Expand Down Expand Up @@ -346,6 +352,9 @@ public function supportsColumnCollation()
return true;
}

/**
* {@inheritDoc}
*/
public function getListTablesSQL()
{
return "SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'";
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ public function getAlterTableSQL(TableDiff $diff)
}

if ($columnDiff->hasChanged('notnull')) {
$query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotNull() ? 'SET' : 'DROP') . ' NOT NULL';
$query = 'ALTER ' . $oldColumnName . ' ' . ($column->getNotnull() ? 'SET' : 'DROP') . ' NOT NULL';
$sql[] = 'ALTER TABLE ' . $diff->getName($this)->getQuotedName($this) . ' ' . $query;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,8 @@ public function createPositionalParameter($value, $type = \PDO::PARAM_STR)
* @param array $knownAliases
*
* @return string
*
* @throws QueryException
*/
private function getSQLForJoins($fromAlias, array &$knownAliases)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Schema/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ public function getSequences()
* @param string $namespaceName The name of the namespace to create.
*
* @return \Doctrine\DBAL\Schema\Schema This schema instance.
*
* @throws SchemaException
*/
public function createNamespace($namespaceName)
{
Expand Down
6 changes: 6 additions & 0 deletions lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ private function getTableDiffForAlterForeignKey(ForeignKeyConstraint $foreignKey
return $tableDiff;
}

/**
* @param string $column
* @param string $sql
*
* @return string|false
*/
private function parseColumnCollationFromSQL($column, $sql)
{
if (preg_match(
Expand Down
0