Commit 7a7ff795 authored by Alessandro Minoccheri's avatar Alessandro Minoccheri

fixed array declarations inside Query directory

parent 7baf4489
......@@ -51,7 +51,7 @@ class CompositeExpression implements \Countable
*
* @var array
*/
private $parts = array();
private $parts = [];
/**
* Constructor.
......@@ -59,7 +59,7 @@ class CompositeExpression implements \Countable
* @param string $type Instance type of composite expression.
* @param array $parts Composition of expressions to be joined on composite expression.
*/
public function __construct($type, array $parts = array())
public function __construct($type, array $parts = [])
{
$this->type = $type;
......@@ -73,7 +73,7 @@ class CompositeExpression implements \Countable
*
* @return \Doctrine\DBAL\Query\Expression\CompositeExpression
*/
public function addMultiple(array $parts = array())
public function addMultiple(array $parts = [])
{
foreach ((array) $parts as $part) {
$this->add($part);
......
......@@ -63,17 +63,17 @@ class QueryBuilder
/**
* @var array The array of SQL parts collected.
*/
private $sqlParts = array(
'select' => array(),
'from' => array(),
'join' => array(),
'set' => array(),
private $sqlParts = [
'select' => [],
'from' => [],
'join' => [],
'set' => [],
'where' => null,
'groupBy' => array(),
'groupBy' => [],
'having' => null,
'orderBy' => array(),
'values' => array(),
);
'orderBy' => [],
'values' => [],
];
/**
* The complete SQL string for this query.
......@@ -87,14 +87,14 @@ class QueryBuilder
*
* @var array
*/
private $params = array();
private $params = [];
/**
* The parameter type map of this query.
*
* @var array
*/
private $paramTypes = array();
private $paramTypes = [];
/**
* The type of query this is. Can be select, update or delete.
......@@ -298,7 +298,7 @@ class QueryBuilder
*
* @return $this This QueryBuilder instance.
*/
public function setParameters(array $params, array $types = array())
public function setParameters(array $params, array $types = [])
{
$this->paramTypes = $types;
$this->params = $params;
......@@ -527,10 +527,10 @@ class QueryBuilder
return $this;
}
return $this->add('from', array(
return $this->add('from', [
'table' => $delete,
'alias' => $alias
));
]);
}
/**
......@@ -557,10 +557,10 @@ class QueryBuilder
return $this;
}
return $this->add('from', array(
return $this->add('from', [
'table' => $update,
'alias' => $alias
));
]);
}
/**
......@@ -590,9 +590,9 @@ class QueryBuilder
return $this;
}
return $this->add('from', array(
return $this->add('from', [
'table' => $insert
));
]);
}
/**
......@@ -612,10 +612,10 @@ class QueryBuilder
*/
public function from($from, $alias = null)
{
return $this->add('from', array(
return $this->add('from', [
'table' => $from,
'alias' => $alias
), true);
], true);
}
/**
......@@ -659,14 +659,14 @@ class QueryBuilder
*/
public function innerJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->add('join', array(
$fromAlias => array(
return $this->add('join', [
$fromAlias => [
'joinType' => 'inner',
'joinTable' => $join,
'joinAlias' => $alias,
'joinCondition' => $condition
)
), true);
]
], true);
}
/**
......@@ -688,14 +688,14 @@ class QueryBuilder
*/
public function leftJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->add('join', array(
$fromAlias => array(
return $this->add('join', [
$fromAlias => [
'joinType' => 'left',
'joinTable' => $join,
'joinAlias' => $alias,
'joinCondition' => $condition
)
), true);
]
], true);
}
/**
......@@ -717,14 +717,14 @@ class QueryBuilder
*/
public function rightJoin($fromAlias, $join, $alias, $condition = null)
{
return $this->add('join', array(
$fromAlias => array(
return $this->add('join', [
$fromAlias => [
'joinType' => 'right',
'joinTable' => $join,
'joinAlias' => $alias,
'joinCondition' => $condition
)
), true);
]
], true);
}
/**
......
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