Use short array declaration

This commit is contained in:
Romain Neutron
2013-11-18 11:58:12 +01:00
parent 2898b317c4
commit 56b373ee6e
723 changed files with 8350 additions and 8352 deletions

View File

@@ -21,8 +21,8 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
public function buildSql()
{
$filter = $this->filter->getReportFilter() ? : array('params' => array(), 'sql' => false);
$this->params = array_merge(array(), $filter['params']);
$filter = $this->filter->getReportFilter() ? : ['params' => [], 'sql' => false];
$this->params = array_merge([], $filter['params']);
if ($this->groupby == false) {
$this->sql ="
@@ -65,8 +65,8 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
public function sqlDistinctValByField($field)
{
$filter = $this->filter->getReportFilter() ? : array('params' => array(), 'sql' => false);
$this->params = array_merge(array(), $filter['params']);
$filter = $this->filter->getReportFilter() ? : ['params' => [], 'sql' => false];
$this->params = array_merge([], $filter['params']);
$this->sql = "
SELECT DISTINCT(tt.val)
@@ -79,6 +79,6 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
) as tt
ORDER BY tt.val ASC";
return array('sql' => $this->sql, 'params' => $this->params);
return ['sql' => $this->sql, 'params' => $this->params];
}
}