Skip to content
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

Using short array declarations in the MasterSlaveConnection namespace #2746

Merged
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
Diff view
12 changes: 6 additions & 6 deletions lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MasterSlaveConnection extends Connection
*
* @var \Doctrine\DBAL\Driver\Connection[]
*/
protected $connections = array('master' => null, 'slave' => null);
protected $connections = ['master' => null, 'slave' => null];

/**
* You can keep the slave connection and then switch back to it
Expand Down Expand Up @@ -202,7 +202,7 @@ protected function connectTo($connectionName)
{
$params = $this->getParams();

$driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : array();
$driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : [];

$connectionParams = $this->chooseConnectionConfiguration($connectionName, $params);

Expand Down Expand Up @@ -230,7 +230,7 @@ protected function chooseConnectionConfiguration($connectionName, $params)
/**
* {@inheritDoc}
*/
public function executeUpdate($query, array $params = array(), array $types = array())
public function executeUpdate($query, array $params = [], array $types = [])
{
$this->connect('master');

Expand Down Expand Up @@ -270,7 +270,7 @@ public function rollBack()
/**
* {@inheritDoc}
*/
public function delete($tableName, array $identifier, array $types = array())
public function delete($tableName, array $identifier, array $types = [])
{
$this->connect('master');

Expand All @@ -294,7 +294,7 @@ public function close()
/**
* {@inheritDoc}
*/
public function update($tableName, array $data, array $identifier, array $types = array())
public function update($tableName, array $data, array $identifier, array $types = [])
{
$this->connect('master');

Expand All @@ -304,7 +304,7 @@ public function update($tableName, array $data, array $identifier, array $types
/**
* {@inheritDoc}
*/
public function insert($tableName, array $data, array $types = array())
public function insert($tableName, array $data, array $types = [])
{
$this->connect('master');

Expand Down