Commit 7b9474fc authored by Jeroen Thora's avatar Jeroen Thora Committed by Steve Müller

minor phpdoc fixes in the platform files

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