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

minor phpdoc fixes in the remaining files after pr #746

parent 7b9474fc
...@@ -121,7 +121,7 @@ class MasterSlaveConnection extends Connection ...@@ -121,7 +121,7 @@ class MasterSlaveConnection extends Connection
$params['slaves'][$slaveKey]['driver'] = $params['driver']; $params['slaves'][$slaveKey]['driver'] = $params['driver'];
} }
$this->keepSlave = isset($params['keepSlave']) ? (bool)$params['keepSlave'] : false; $this->keepSlave = isset($params['keepSlave']) ? (bool) $params['keepSlave'] : false;
parent::__construct($params, $driver, $config, $eventManager); parent::__construct($params, $driver, $config, $eventManager);
} }
......
...@@ -27,7 +27,7 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection ...@@ -27,7 +27,7 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function quote($value, $type=\PDO::PARAM_STR) public function quote($value, $type = \PDO::PARAM_STR)
{ {
if (\PDO::PARAM_BOOL === $type) { if (\PDO::PARAM_BOOL === $type) {
if ($value) { if ($value) {
...@@ -36,6 +36,7 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection ...@@ -36,6 +36,7 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection
return 'false'; return 'false';
} }
} }
return parent::quote($value, $type); return parent::quote($value, $type);
} }
} }
...@@ -78,6 +78,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -78,6 +78,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
if ( ! $stmt) { if ( ! $stmt) {
throw new DB2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
} }
return new DB2Statement($stmt); return new DB2Statement($stmt);
} }
...@@ -90,6 +91,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -90,6 +91,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
$sql = $args[0]; $sql = $args[0];
$stmt = $this->prepare($sql); $stmt = $this->prepare($sql);
$stmt->execute(); $stmt->execute();
return $stmt; return $stmt;
} }
...@@ -113,6 +115,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -113,6 +115,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
{ {
$stmt = $this->prepare($statement); $stmt = $this->prepare($statement);
$stmt->execute(); $stmt->execute();
return $stmt->rowCount(); return $stmt->rowCount();
} }
......
...@@ -135,6 +135,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -135,6 +135,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
$sql = $args[0]; $sql = $args[0];
$stmt = $this->prepare($sql); $stmt = $this->prepare($sql);
$stmt->execute(); $stmt->execute();
return $stmt; return $stmt;
} }
...@@ -172,6 +173,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -172,6 +173,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
public function beginTransaction() public function beginTransaction()
{ {
$this->_conn->query('START TRANSACTION'); $this->_conn->query('START TRANSACTION');
return true; return true;
} }
......
...@@ -97,7 +97,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -97,7 +97,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
$paramCount = $this->_stmt->param_count; $paramCount = $this->_stmt->param_count;
if (0 < $paramCount) { if (0 < $paramCount) {
$this->types = str_repeat('s', $paramCount); $this->types = str_repeat('s', $paramCount);
$this->_bindedValues = array_fill(1 , $paramCount, null); $this->_bindedValues = array_fill(1, $paramCount, null);
} }
} }
...@@ -178,7 +178,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -178,7 +178,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
$meta->free(); $meta->free();
$this->_columnNames = $columnNames; $this->_columnNames = $columnNames;
$this->_rowBindedValues = array_fill(0, count($columnNames), NULL); $this->_rowBindedValues = array_fill(0, count($columnNames), null);
$refs = array(); $refs = array();
foreach ($this->_rowBindedValues as $key => &$value) { foreach ($this->_rowBindedValues as $key => &$value) {
...@@ -228,6 +228,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -228,6 +228,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
foreach ($this->_rowBindedValues as $v) { foreach ($this->_rowBindedValues as $v) {
$values[] = $v; $values[] = $v;
} }
return $values; return $values;
} }
...@@ -260,6 +261,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -260,6 +261,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
case PDO::FETCH_BOTH: case PDO::FETCH_BOTH:
$ret = array_combine($this->_columnNames, $values); $ret = array_combine($this->_columnNames, $values);
$ret += $values; $ret += $values;
return $ret; return $ret;
default: default:
...@@ -335,6 +337,7 @@ class MysqliStatement implements \IteratorAggregate, Statement ...@@ -335,6 +337,7 @@ class MysqliStatement implements \IteratorAggregate, Statement
if (false === $this->_columnNames) { if (false === $this->_columnNames) {
return $this->_stmt->affected_rows; return $this->_stmt->affected_rows;
} }
return $this->_stmt->num_rows; return $this->_stmt->num_rows;
} }
......
...@@ -126,7 +126,7 @@ class SQLSrvStatement implements IteratorAggregate, Statement ...@@ -126,7 +126,7 @@ class SQLSrvStatement implements IteratorAggregate, Statement
*/ */
public function bindValue($param, $value, $type = null) public function bindValue($param, $value, $type = null)
{ {
return $this->bindParam($param, $value, $type,null); return $this->bindParam($param, $value, $type, null);
} }
/** /**
......
...@@ -155,7 +155,7 @@ class TableGenerator ...@@ -155,7 +155,7 @@ class TableGenerator
$this->conn->commit(); $this->conn->commit();
} catch(\Exception $e) { } 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); throw new \Doctrine\DBAL\DBALException("Error occurred while generating ID with TableGenerator, aborted generation: " . $e->getMessage(), 0, $e);
} }
......
...@@ -1293,6 +1293,7 @@ class QueryBuilder ...@@ -1293,6 +1293,7 @@ class QueryBuilder
{ {
$this->boundCounter++; $this->boundCounter++;
$this->setParameter($this->boundCounter, $value, $type); $this->setParameter($this->boundCounter, $value, $type);
return "?"; return "?";
} }
......
...@@ -99,7 +99,7 @@ abstract class AbstractAsset ...@@ -99,7 +99,7 @@ abstract class AbstractAsset
* The shortest name is stripped of the default namespace. All other * The shortest name is stripped of the default namespace. All other
* namespaced elements are returned as full-qualified names. * namespaced elements are returned as full-qualified names.
* *
* @param string * @param string $defaultNamespaceName
* *
* @return string * @return string
*/ */
...@@ -180,6 +180,7 @@ abstract class AbstractAsset ...@@ -180,6 +180,7 @@ abstract class AbstractAsset
if ($this->_namespace) { if ($this->_namespace) {
return $this->_namespace . "." . $this->_name; return $this->_namespace . "." . $this->_name;
} }
return $this->_name; return $this->_name;
} }
......
...@@ -202,7 +202,7 @@ abstract class AbstractSchemaManager ...@@ -202,7 +202,7 @@ abstract class AbstractSchemaManager
*/ */
public function tablesExist($tableNames) public function tablesExist($tableNames)
{ {
$tableNames = array_map('strtolower', (array)$tableNames); $tableNames = array_map('strtolower', (array) $tableNames);
return count($tableNames) == count(\array_intersect($tableNames, array_map('strtolower', $this->listTableNames()))); return count($tableNames) == count(\array_intersect($tableNames, array_map('strtolower', $this->listTableNames())));
} }
...@@ -237,9 +237,10 @@ abstract class AbstractSchemaManager ...@@ -237,9 +237,10 @@ abstract class AbstractSchemaManager
return $assetNames; return $assetNames;
} }
return array_values ( return array_values(
array_filter($assetNames, function ($assetName) use ($filterExpr) { array_filter($assetNames, function ($assetName) use ($filterExpr) {
$assetName = ($assetName instanceof AbstractAsset) ? $assetName->getName() : $assetName; $assetName = ($assetName instanceof AbstractAsset) ? $assetName->getName() : $assetName;
return preg_match($filterExpr, $assetName); return preg_match($filterExpr, $assetName);
}) })
); );
...@@ -952,6 +953,7 @@ abstract class AbstractSchemaManager ...@@ -952,6 +953,7 @@ abstract class AbstractSchemaManager
/** /**
* @param array $views * @param array $views
*
* @return array * @return array
*/ */
protected function _getPortableViewsList($views) protected function _getPortableViewsList($views)
......
...@@ -134,6 +134,7 @@ class Column extends AbstractAsset ...@@ -134,6 +134,7 @@ class Column extends AbstractAsset
public function setType(Type $type) public function setType(Type $type)
{ {
$this->_type = $type; $this->_type = $type;
return $this; return $this;
} }
...@@ -145,7 +146,7 @@ class Column extends AbstractAsset ...@@ -145,7 +146,7 @@ class Column extends AbstractAsset
public function setLength($length) public function setLength($length)
{ {
if ($length !== null) { if ($length !== null) {
$this->_length = (int)$length; $this->_length = (int) $length;
} else { } else {
$this->_length = null; $this->_length = null;
} }
...@@ -164,7 +165,7 @@ class Column extends AbstractAsset ...@@ -164,7 +165,7 @@ class Column extends AbstractAsset
$precision = 10; // defaults to 10 when no valid precision is given. $precision = 10; // defaults to 10 when no valid precision is given.
} }
$this->_precision = (int)$precision; $this->_precision = (int) $precision;
return $this; return $this;
} }
...@@ -180,7 +181,7 @@ class Column extends AbstractAsset ...@@ -180,7 +181,7 @@ class Column extends AbstractAsset
$scale = 0; $scale = 0;
} }
$this->_scale = (int)$scale; $this->_scale = (int) $scale;
return $this; return $this;
} }
...@@ -192,7 +193,7 @@ class Column extends AbstractAsset ...@@ -192,7 +193,7 @@ class Column extends AbstractAsset
*/ */
public function setUnsigned($unsigned) public function setUnsigned($unsigned)
{ {
$this->_unsigned = (bool)$unsigned; $this->_unsigned = (bool) $unsigned;
return $this; return $this;
} }
...@@ -204,7 +205,7 @@ class Column extends AbstractAsset ...@@ -204,7 +205,7 @@ class Column extends AbstractAsset
*/ */
public function setFixed($fixed) public function setFixed($fixed)
{ {
$this->_fixed = (bool)$fixed; $this->_fixed = (bool) $fixed;
return $this; return $this;
} }
...@@ -216,7 +217,7 @@ class Column extends AbstractAsset ...@@ -216,7 +217,7 @@ class Column extends AbstractAsset
*/ */
public function setNotnull($notnull) public function setNotnull($notnull)
{ {
$this->_notnull = (bool)$notnull; $this->_notnull = (bool) $notnull;
return $this; return $this;
} }
...@@ -386,6 +387,7 @@ class Column extends AbstractAsset ...@@ -386,6 +387,7 @@ class Column extends AbstractAsset
public function setAutoincrement($flag) public function setAutoincrement($flag)
{ {
$this->_autoincrement = $flag; $this->_autoincrement = $flag;
return $this; return $this;
} }
......
...@@ -87,8 +87,8 @@ class DB2SchemaManager extends AbstractSchemaManager ...@@ -87,8 +87,8 @@ class DB2SchemaManager extends AbstractSchemaManager
$options = array( $options = array(
'length' => $length, 'length' => $length,
'unsigned' => (bool)$unsigned, 'unsigned' => (bool) $unsigned,
'fixed' => (bool)$fixed, 'fixed' => (bool) $fixed,
'default' => $default, 'default' => $default,
'autoincrement' => (boolean) $tableColumn['autoincrement'], 'autoincrement' => (boolean) $tableColumn['autoincrement'],
'notnull' => (bool) ($tableColumn['nulls'] == 'N'), 'notnull' => (bool) ($tableColumn['nulls'] == 'N'),
......
...@@ -40,12 +40,12 @@ class DrizzleSchemaManager extends AbstractSchemaManager ...@@ -40,12 +40,12 @@ class DrizzleSchemaManager extends AbstractSchemaManager
$tableColumn['COLUMN_COMMENT'] = $this->removeDoctrineTypeFromComment($tableColumn['COLUMN_COMMENT'], $type); $tableColumn['COLUMN_COMMENT'] = $this->removeDoctrineTypeFromComment($tableColumn['COLUMN_COMMENT'], $type);
$options = array( $options = array(
'notnull' => !(bool)$tableColumn['IS_NULLABLE'], 'notnull' => !(bool) $tableColumn['IS_NULLABLE'],
'length' => (int)$tableColumn['CHARACTER_MAXIMUM_LENGTH'], 'length' => (int) $tableColumn['CHARACTER_MAXIMUM_LENGTH'],
'default' => isset($tableColumn['COLUMN_DEFAULT']) ? $tableColumn['COLUMN_DEFAULT'] : null, 'default' => isset($tableColumn['COLUMN_DEFAULT']) ? $tableColumn['COLUMN_DEFAULT'] : null,
'autoincrement' => (bool)$tableColumn['IS_AUTO_INCREMENT'], 'autoincrement' => (bool) $tableColumn['IS_AUTO_INCREMENT'],
'scale' => (int)$tableColumn['NUMERIC_SCALE'], 'scale' => (int) $tableColumn['NUMERIC_SCALE'],
'precision' => (int)$tableColumn['NUMERIC_PRECISION'], 'precision' => (int) $tableColumn['NUMERIC_PRECISION'],
'comment' => isset($tableColumn['COLUMN_COMMENT']) && '' !== $tableColumn['COLUMN_COMMENT'] 'comment' => isset($tableColumn['COLUMN_COMMENT']) && '' !== $tableColumn['COLUMN_COMMENT']
? $tableColumn['COLUMN_COMMENT'] ? $tableColumn['COLUMN_COMMENT']
: null, : null,
...@@ -86,15 +86,15 @@ class DrizzleSchemaManager extends AbstractSchemaManager ...@@ -86,15 +86,15 @@ class DrizzleSchemaManager extends AbstractSchemaManager
$columns[] = trim($value, ' `'); $columns[] = trim($value, ' `');
} }
$ref_columns = array(); $refColumns = array();
foreach (explode(',', $tableForeignKey['REFERENCED_TABLE_COLUMNS']) as $value) { foreach (explode(',', $tableForeignKey['REFERENCED_TABLE_COLUMNS']) as $value) {
$ref_columns[] = trim($value, ' `'); $refColumns[] = trim($value, ' `');
} }
return new ForeignKeyConstraint( return new ForeignKeyConstraint(
$columns, $columns,
$tableForeignKey['REFERENCED_TABLE_NAME'], $tableForeignKey['REFERENCED_TABLE_NAME'],
$ref_columns, $refColumns,
$tableForeignKey['CONSTRAINT_NAME'], $tableForeignKey['CONSTRAINT_NAME'],
array( array(
'onUpdate' => $tableForeignKey['UPDATE_RULE'], 'onUpdate' => $tableForeignKey['UPDATE_RULE'],
...@@ -110,7 +110,7 @@ class DrizzleSchemaManager extends AbstractSchemaManager ...@@ -110,7 +110,7 @@ class DrizzleSchemaManager extends AbstractSchemaManager
{ {
$indexes = array(); $indexes = array();
foreach ($tableIndexes as $k) { foreach ($tableIndexes as $k) {
$k['primary'] = (boolean)$k['primary']; $k['primary'] = (boolean) $k['primary'];
$indexes[] = $k; $indexes[] = $k;
} }
......
...@@ -231,6 +231,7 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint ...@@ -231,6 +231,7 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint
public function getUnqualifiedForeignTableName() public function getUnqualifiedForeignTableName()
{ {
$parts = explode(".", $this->_foreignTableName->getName()); $parts = explode(".", $this->_foreignTableName->getName());
return strtolower(end($parts)); return strtolower(end($parts));
} }
......
...@@ -339,6 +339,7 @@ class Index extends AbstractAsset implements Constraint ...@@ -339,6 +339,7 @@ class Index extends AbstractAsset implements Constraint
/** /**
* Return whether the two indexes have the same partial index * Return whether the two indexes have the same partial index
* @param \Doctrine\DBAL\Schema\Index $other * @param \Doctrine\DBAL\Schema\Index $other
*
* @return boolean * @return boolean
*/ */
private function samePartialIndex(Index $other) private function samePartialIndex(Index $other)
......
...@@ -206,13 +206,13 @@ class SQLServerSchemaManager extends AbstractSchemaManager ...@@ -206,13 +206,13 @@ class SQLServerSchemaManager extends AbstractSchemaManager
try { try {
$tableIndexes = $this->_conn->fetchAll($sql); $tableIndexes = $this->_conn->fetchAll($sql);
} catch(\PDOException $e) { } catch (\PDOException $e) {
if ($e->getCode() == "IMSSP") { if ($e->getCode() == "IMSSP") {
return array(); return array();
} else { } else {
throw $e; throw $e;
} }
} catch(SQLSrvException $e) { } catch (SQLSrvException $e) {
if (strpos($e->getMessage(), 'SQLSTATE [01000, 15472]') === 0) { if (strpos($e->getMessage(), 'SQLSTATE [01000, 15472]') === 0) {
return array(); return array();
} else { } else {
......
...@@ -63,7 +63,7 @@ class SchemaConfig ...@@ -63,7 +63,7 @@ class SchemaConfig
*/ */
public function setExplicitForeignKeyIndexes($flag) public function setExplicitForeignKeyIndexes($flag)
{ {
$this->hasExplicitForeignKeyIndexes = (bool)$flag; $this->hasExplicitForeignKeyIndexes = (bool) $flag;
} }
/** /**
...@@ -73,7 +73,7 @@ class SchemaConfig ...@@ -73,7 +73,7 @@ class SchemaConfig
*/ */
public function setMaxIdentifierLength($length) public function setMaxIdentifierLength($length)
{ {
$this->maxIdentifierLength = (int)$length; $this->maxIdentifierLength = (int) $length;
} }
/** /**
......
...@@ -176,6 +176,6 @@ class SchemaException extends \Doctrine\DBAL\DBALException ...@@ -176,6 +176,6 @@ class SchemaException extends \Doctrine\DBAL\DBALException
*/ */
static public function alterTableChangeNotSupported($changeName) static public function alterTableChangeNotSupported($changeName)
{ {
return new self ("Alter table change not supported, given '$changeName'"); return new self("Alter table change not supported, given '$changeName'");
} }
} }
...@@ -172,6 +172,7 @@ class SqliteSchemaManager extends AbstractSchemaManager ...@@ -172,6 +172,7 @@ class SqliteSchemaManager extends AbstractSchemaManager
if ($a['pk'] == $b['pk']) { if ($a['pk'] == $b['pk']) {
return $a['cid'] - $b['cid']; return $a['cid'] - $b['cid'];
} }
return $a['pk'] - $b['pk']; return $a['pk'] - $b['pk'];
}); });
foreach ($indexArray as $indexColumnRow) { foreach ($indexArray as $indexColumnRow) {
......
...@@ -47,7 +47,7 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer ...@@ -47,7 +47,7 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
foreach ($sql as $s) { foreach ($sql as $s) {
try { try {
$this->conn->exec($s); $this->conn->exec($s);
} catch(\Exception $e) { } catch (\Exception $e) {
} }
} }
......
...@@ -383,7 +383,7 @@ class Table extends AbstractAsset ...@@ -383,7 +383,7 @@ class Table extends AbstractAsset
*/ */
public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array(), $constraintName = null) public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options=array(), $constraintName = null)
{ {
$constraintName = $constraintName ?: $this->_generateIdentifierName(array_merge((array)$this->getName(), $localColumnNames), "fk", $this->_getMaxIdentifierLength()); $constraintName = $constraintName ?: $this->_generateIdentifierName(array_merge((array) $this->getName(), $localColumnNames), "fk", $this->_getMaxIdentifierLength());
return $this->addNamedForeignKeyConstraint($constraintName, $foreignTable, $localColumnNames, $foreignColumnNames, $options); return $this->addNamedForeignKeyConstraint($constraintName, $foreignTable, $localColumnNames, $foreignColumnNames, $options);
} }
...@@ -532,7 +532,7 @@ class Table extends AbstractAsset ...@@ -532,7 +532,7 @@ class Table extends AbstractAsset
$name = $constraint->getName(); $name = $constraint->getName();
} else { } else {
$name = $this->_generateIdentifierName( $name = $this->_generateIdentifierName(
array_merge((array)$this->getName(), $constraint->getLocalColumns()), "fk", $this->_getMaxIdentifierLength() array_merge((array) $this->getName(), $constraint->getLocalColumns()), "fk", $this->_getMaxIdentifierLength()
); );
} }
$name = $this->normalizeIdentifier($name); $name = $this->normalizeIdentifier($name);
......
...@@ -103,7 +103,7 @@ class CreateSchemaSqlCollector extends AbstractVisitor ...@@ -103,7 +103,7 @@ class CreateSchemaSqlCollector extends AbstractVisitor
{ {
$this->createSequenceQueries = array_merge( $this->createSequenceQueries = array_merge(
$this->createSequenceQueries, $this->createSequenceQueries,
(array)$this->platform->getCreateSequenceSQL($sequence) (array) $this->platform->getCreateSequenceSQL($sequence)
); );
} }
......
...@@ -151,10 +151,11 @@ class PoolingShardConnection extends Connection ...@@ -151,10 +151,11 @@ class PoolingShardConnection extends Connection
throw new ShardingException("Cannot switch shard when transaction is active."); throw new ShardingException("Cannot switch shard when transaction is active.");
} }
$this->activeShardId = (int)$shardId; $this->activeShardId = (int) $shardId;
if (isset($this->activeConnections[$this->activeShardId])) { if (isset($this->activeConnections[$this->activeShardId])) {
$this->_conn = $this->activeConnections[$this->activeShardId]; $this->_conn = $this->activeConnections[$this->activeShardId];
return false; return false;
} }
......
...@@ -280,6 +280,7 @@ class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer ...@@ -280,6 +280,7 @@ class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer
$defaultValue = ''; $defaultValue = '';
break; break;
} }
return $defaultValue; return $defaultValue;
} }
......
...@@ -86,7 +86,7 @@ class SQLAzureShardManager implements ShardManager ...@@ -86,7 +86,7 @@ class SQLAzureShardManager implements ShardManager
$this->federationName = $params['sharding']['federationName']; $this->federationName = $params['sharding']['federationName'];
$this->distributionKey = $params['sharding']['distributionKey']; $this->distributionKey = $params['sharding']['distributionKey'];
$this->distributionType = $params['sharding']['distributionType']; $this->distributionType = $params['sharding']['distributionType'];
$this->filteringEnabled = (isset($params['sharding']['filteringEnabled'])) ? (bool)$params['sharding']['filteringEnabled'] : false; $this->filteringEnabled = (isset($params['sharding']['filteringEnabled'])) ? (bool) $params['sharding']['filteringEnabled'] : false;
} }
/** /**
...@@ -128,7 +128,7 @@ class SQLAzureShardManager implements ShardManager ...@@ -128,7 +128,7 @@ class SQLAzureShardManager implements ShardManager
*/ */
public function setFilteringEnabled($flag) public function setFilteringEnabled($flag)
{ {
$this->filteringEnabled = (bool)$flag; $this->filteringEnabled = (bool) $flag;
} }
/** /**
...@@ -191,6 +191,7 @@ class SQLAzureShardManager implements ShardManager ...@@ -191,6 +191,7 @@ class SQLAzureShardManager implements ShardManager
FROM sys.federation_member_distributions d FROM sys.federation_member_distributions d
INNER JOIN sys.federations f ON f.federation_id = d.federation_id INNER JOIN sys.federations f ON f.federation_id = d.federation_id
WHERE f.name = " . $this->conn->quote($this->federationName); WHERE f.name = " . $this->conn->quote($this->federationName);
return $this->conn->fetchAll($sql); return $this->conn->fetchAll($sql);
} }
......
...@@ -118,7 +118,7 @@ EOT ...@@ -118,7 +118,7 @@ EOT
/* @var $conn \Doctrine\DBAL\Connection */ /* @var $conn \Doctrine\DBAL\Connection */
$conn = $this->getHelper('db')->getConnection(); $conn = $this->getHelper('db')->getConnection();
$keywordLists = (array)$input->getOption('list'); $keywordLists = (array) $input->getOption('list');
if ( ! $keywordLists) { if ( ! $keywordLists) {
$keywordLists = array( $keywordLists = array(
'mysql', 'mysql',
......
...@@ -50,6 +50,7 @@ class VarDateTimeType extends DateTimeType ...@@ -50,6 +50,7 @@ class VarDateTimeType extends DateTimeType
if ( ! $val) { if ( ! $val) {
throw ConversionException::conversionFailed($value, $this->getName()); throw ConversionException::conversionFailed($value, $this->getName());
} }
return $val; return $val;
} }
} }
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