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

@@ -28,7 +28,7 @@ class patch_320alpha2a implements patchInterface
*
* @var Array
*/
private $concern = array(base::APPLICATION_BOX);
private $concern = [base::APPLICATION_BOX];
/**
*
@@ -66,7 +66,7 @@ class patch_320alpha2a implements patchInterface
$stmt = $appbox->get_connection()->prepare($sql);
foreach ($rs as $row) {
$nonce = random::generatePassword(16);
$params = array(':usr_id' => $row['usr_id'], ':nonce' => $nonce);
$params = [':usr_id' => $row['usr_id'], ':nonce' => $nonce];
$stmt->execute($params);
}
$stmt->closeCursor();
@@ -83,10 +83,10 @@ class patch_320alpha2a implements patchInterface
if (strpos($row['class'], 'task_period_') !== false)
continue;
$params = array(
$params = [
':task_id' => $row['task_id']
, ':class' => str_replace('task_', 'task_period_', $row['class'])
);
];
$stmt->execute($params);
}