mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Use short array declaration
This commit is contained in:
@@ -54,7 +54,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
|
||||
* @desc le tableau qui contien les resultats
|
||||
* @var <array>
|
||||
*/
|
||||
public $report = array();
|
||||
public $report = [];
|
||||
private $app;
|
||||
|
||||
/**
|
||||
@@ -242,9 +242,9 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
|
||||
|
||||
public function __sleep()
|
||||
{
|
||||
$vars = array();
|
||||
$vars = [];
|
||||
foreach ($this as $key => $value) {
|
||||
if (in_array($key, array('app')))
|
||||
if (in_array($key, ['app']))
|
||||
continue;
|
||||
$vars[] = $key;
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
class module_report_dashboard_group implements module_report_dashboard_componentInterface
|
||||
{
|
||||
public $group_dash;
|
||||
public $dashboard = array();
|
||||
public $dashboard = [];
|
||||
private $valid = false;
|
||||
|
||||
/**
|
||||
@@ -35,7 +35,7 @@ class module_report_dashboard_group implements module_report_dashboard_component
|
||||
{
|
||||
if ($this->valid) {
|
||||
if (is_null($this->group_dash))
|
||||
$this->group_dash = array();
|
||||
$this->group_dash = [];
|
||||
foreach ($this->dashboard as $key => $dash) {
|
||||
if (is_object($dash) &&
|
||||
$dash instanceof module_report_dashboard_feed &&
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
class module_report_dashboard_merge implements module_report_dashboard_componentInterface
|
||||
{
|
||||
public $sort = array();
|
||||
public $sorted = array();
|
||||
public $sort = [];
|
||||
public $sorted = [];
|
||||
private $currentkey;
|
||||
private $valid = false;
|
||||
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
class module_report_dashboard_sort implements module_report_dashboard_componentInterface
|
||||
{
|
||||
public $arrayToSort = array();
|
||||
public $arraySorted = array();
|
||||
public $arrayToSort = [];
|
||||
public $arraySorted = [];
|
||||
|
||||
public function __construct(module_report_dashboard_merge $tridash)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
|
||||
|
||||
foreach ($args as $n => $field) {
|
||||
if (is_string($field)) { // = clef
|
||||
$tmp = array();
|
||||
$tmp = [];
|
||||
foreach ($data as $key => $row)
|
||||
$tmp[$key] = $row[$field];
|
||||
$args[$n] = &$tmp;
|
||||
@@ -130,15 +130,15 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
|
||||
public function getTop($nbtop)
|
||||
{
|
||||
if ( ! is_int($nbtop)) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
|
||||
$tmp = array();
|
||||
$tmp = [];
|
||||
|
||||
if ($this->isValid()) {
|
||||
foreach ($this->arraySorted as $k => $v) {
|
||||
$i = 0;
|
||||
$tmp[$k] = array();
|
||||
$tmp[$k] = [];
|
||||
foreach ($v as $a) {
|
||||
if ($i < $nbtop)
|
||||
array_push($tmp[$k], $a);
|
||||
|
Reference in New Issue
Block a user