Skip to content

Commit

Permalink
Merge pull request #841 from BenMorel/docfix
Browse files Browse the repository at this point in the history
Documentation & code styling fixes
  • Loading branch information
deeky666 committed Apr 30, 2015
2 parents 41e718e + 91f1b30 commit 32b1a4f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 8 deletions.
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 comments on commit 32b1a4f

Please sign in to comment.