mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Use short array declaration
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user