Commit edaf185a authored by Jeroen Thora's avatar Jeroen Thora

minor phpdoc fixes in the platform files

parent 8bf95aae
...@@ -164,7 +164,7 @@ abstract class AbstractPlatform ...@@ -164,7 +164,7 @@ abstract class AbstractPlatform
/** /**
* Sets the EventManager used by the Platform. * Sets the EventManager used by the Platform.
* *
* @param \Doctrine\Common\EventManager * @param \Doctrine\Common\EventManager $eventManager
*/ */
public function setEventManager(EventManager $eventManager) public function setEventManager(EventManager $eventManager)
{ {
...@@ -901,7 +901,7 @@ abstract class AbstractPlatform ...@@ -901,7 +901,7 @@ abstract class AbstractPlatform
*/ */
public function getConcatExpression() public function getConcatExpression()
{ {
return join(' || ' , func_get_args()); return join(' || ', func_get_args());
} }
/** /**
...@@ -2253,9 +2253,9 @@ abstract class AbstractPlatform ...@@ -2253,9 +2253,9 @@ abstract class AbstractPlatform
$default = " DEFAULT ".$field['default']; $default = " DEFAULT ".$field['default'];
} elseif (in_array((string) $field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) { } elseif (in_array((string) $field['type'], array('DateTime', 'DateTimeTz')) && $field['default'] == $this->getCurrentTimestampSQL()) {
$default = " DEFAULT ".$this->getCurrentTimestampSQL(); $default = " DEFAULT ".$this->getCurrentTimestampSQL();
} elseif ((string)$field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) { } elseif ((string) $field['type'] == 'Time' && $field['default'] == $this->getCurrentTimeSQL()) {
$default = " DEFAULT ".$this->getCurrentTimeSQL(); $default = " DEFAULT ".$this->getCurrentTimeSQL();
} elseif ((string)$field['type'] == 'Date' && $field['default'] == $this->getCurrentDateSQL()) { } elseif ((string) $field['type'] == 'Date' && $field['default'] == $this->getCurrentDateSQL()) {
$default = " DEFAULT ".$this->getCurrentDateSQL(); $default = " DEFAULT ".$this->getCurrentDateSQL();
} elseif ((string) $field['type'] == 'Boolean') { } elseif ((string) $field['type'] == 'Boolean') {
$default = " DEFAULT '" . $this->convertBooleans($field['default']) . "'"; $default = " DEFAULT '" . $this->convertBooleans($field['default']) . "'";
...@@ -2583,6 +2583,7 @@ abstract class AbstractPlatform ...@@ -2583,6 +2583,7 @@ abstract class AbstractPlatform
* This method should handle the literal case * This method should handle the literal case
* *
* @param mixed $item A boolean or an array of them. * @param mixed $item A boolean or an array of them.
*
* @return mixed A boolean database value or an array of them. * @return mixed A boolean database value or an array of them.
*/ */
public function convertBooleans($item) public function convertBooleans($item)
...@@ -2621,6 +2622,7 @@ abstract class AbstractPlatform ...@@ -2621,6 +2622,7 @@ abstract class AbstractPlatform
* Note: if the input is not a boolean the original input might be returned. * Note: if the input is not a boolean the original input might be returned.
* *
* @param mixed $item A boolean or an array of them. * @param mixed $item A boolean or an array of them.
*
* @return mixed A boolean database value or an array of them. * @return mixed A boolean database value or an array of them.
*/ */
public function convertBooleansToDatabaseValue($item) public function convertBooleansToDatabaseValue($item)
...@@ -3300,11 +3302,11 @@ abstract class AbstractPlatform ...@@ -3300,11 +3302,11 @@ abstract class AbstractPlatform
final public function modifyLimitQuery($query, $limit, $offset = null) final public function modifyLimitQuery($query, $limit, $offset = null)
{ {
if ($limit !== null) { if ($limit !== null) {
$limit = (int)$limit; $limit = (int) $limit;
} }
if ($offset !== null) { if ($offset !== null) {
$offset = (int)$offset; $offset = (int) $offset;
if ($offset < 0) { if ($offset < 0) {
throw new DBALException("LIMIT argument offset=$offset is not valid"); throw new DBALException("LIMIT argument offset=$offset is not valid");
......
...@@ -703,7 +703,7 @@ class DB2Platform extends AbstractPlatform ...@@ -703,7 +703,7 @@ class DB2Platform extends AbstractPlatform
} }
if (isset($field['version']) && $field['version']) { if (isset($field['version']) && $field['version']) {
if ((string)$field['type'] != "DateTime") { if ((string) $field['type'] != "DateTime") {
$field['default'] = "1"; $field['default'] = "1";
} }
} }
...@@ -744,8 +744,8 @@ class DB2Platform extends AbstractPlatform ...@@ -744,8 +744,8 @@ class DB2Platform extends AbstractPlatform
return $query; return $query;
} }
$limit = (int)$limit; $limit = (int) $limit;
$offset = (int)(($offset)?:0); $offset = (int) (($offset)?:0);
// Todo OVER() needs ORDER BY data! // Todo OVER() needs ORDER BY data!
$sql = 'SELECT db22.* FROM (SELECT ROW_NUMBER() OVER() AS DC_ROWNUM, db21.* '. $sql = 'SELECT db22.* FROM (SELECT ROW_NUMBER() OVER() AS DC_ROWNUM, db21.* '.
......
...@@ -101,6 +101,7 @@ class DrizzlePlatform extends AbstractPlatform ...@@ -101,6 +101,7 @@ class DrizzlePlatform extends AbstractPlatform
if ( ! empty($columnDef['autoincrement'])) { if ( ! empty($columnDef['autoincrement'])) {
$autoinc = ' AUTO_INCREMENT'; $autoinc = ' AUTO_INCREMENT';
} }
return $autoinc; return $autoinc;
} }
...@@ -205,7 +206,7 @@ class DrizzlePlatform extends AbstractPlatform ...@@ -205,7 +206,7 @@ class DrizzlePlatform extends AbstractPlatform
// add all indexes // add all indexes
if (isset($options['indexes']) && ! empty($options['indexes'])) { if (isset($options['indexes']) && ! empty($options['indexes'])) {
foreach($options['indexes'] as $index => $definition) { foreach ($options['indexes'] as $index => $definition) {
$queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition); $queryFields .= ', ' . $this->getIndexDeclarationSQL($index, $definition);
} }
} }
......
...@@ -72,6 +72,7 @@ class ReservedKeywordsValidator implements Visitor ...@@ -72,6 +72,7 @@ class ReservedKeywordsValidator implements Visitor
$keywordLists[] = $keywordList->getName(); $keywordLists[] = $keywordList->getName();
} }
} }
return $keywordLists; return $keywordLists;
} }
......
...@@ -106,6 +106,7 @@ class MySqlPlatform extends AbstractPlatform ...@@ -106,6 +106,7 @@ class MySqlPlatform extends AbstractPlatform
public function getConcatExpression() public function getConcatExpression()
{ {
$args = func_get_args(); $args = func_get_args();
return 'CONCAT(' . join(', ', (array) $args) . ')'; return 'CONCAT(' . join(', ', (array) $args) . ')';
} }
...@@ -736,6 +737,7 @@ class MySqlPlatform extends AbstractPlatform ...@@ -736,6 +737,7 @@ class MySqlPlatform extends AbstractPlatform
$query .= ' MATCH ' . $foreignKey->getOption('match'); $query .= ' MATCH ' . $foreignKey->getOption('match');
} }
$query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey);
return $query; return $query;
} }
......
...@@ -76,7 +76,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -76,7 +76,7 @@ class PostgreSqlPlatform extends AbstractPlatform
*/ */
public function setUseBooleanTrueFalseStrings($flag) public function setUseBooleanTrueFalseStrings($flag)
{ {
$this->useBooleanTrueFalseStrings = (bool)$flag; $this->useBooleanTrueFalseStrings = (bool) $flag;
} }
/** /**
...@@ -694,6 +694,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -694,6 +694,7 @@ class PostgreSqlPlatform extends AbstractPlatform
if ($sequence instanceof Sequence) { if ($sequence instanceof Sequence) {
$sequence = $sequence->getQuotedName($this); $sequence = $sequence->getQuotedName($this);
} }
return 'DROP SEQUENCE ' . $sequence . ' CASCADE'; return 'DROP SEQUENCE ' . $sequence . ' CASCADE';
} }
...@@ -907,6 +908,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -907,6 +908,7 @@ class PostgreSqlPlatform extends AbstractPlatform
if ( ! empty($field['autoincrement'])) { if ( ! empty($field['autoincrement'])) {
return 'BIGSERIAL'; return 'BIGSERIAL';
} }
return 'BIGINT'; return 'BIGINT';
} }
......
...@@ -272,6 +272,7 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -272,6 +272,7 @@ class SQLServerPlatform extends AbstractPlatform
if ($index->hasFlag('nonclustered')) { if ($index->hasFlag('nonclustered')) {
$flags = ' NONCLUSTERED'; $flags = ' NONCLUSTERED';
} }
return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY' . $flags . ' (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')'; return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY' . $flags . ' (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
} }
...@@ -915,8 +916,8 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -915,8 +916,8 @@ class SQLServerPlatform extends AbstractPlatform
* Returns the where clause to filter schema and table name in a query. * Returns the where clause to filter schema and table name in a query.
* *
* @param string $table The full qualified name of the table. * @param string $table The full qualified name of the table.
* @param string $tableColumn The name of the column to compare the schema to in the where clause. * @param string $schemaColumn The name of the column to compare the schema to in the where clause.
* @param string $schemaColumn The name of the column to compare the table to in the where clause. * @param string $tableColumn The name of the column to compare the table to in the where clause.
* *
* @return string * @return string
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment