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

@@ -16,7 +16,7 @@
*/
function getCountries($lng = 'fr')
{
$countries['en'] = array(
$countries['en'] = [
'AF' => 'AFGHANISTAN',
'AX' => 'ÅLAND ISLANDS',
'AL' => 'ALBANIA',
@@ -263,11 +263,11 @@ function getCountries($lng = 'fr')
'YE' => 'YEMEN',
'ZM' => 'ZAMBIA',
'ZW' => 'ZIMBABWE',
);
];
$countries['us'] = $countries['en'];
$countries['fr'] = array(
$countries['fr'] = [
'AF' => 'AFGHANISTAN',
'ZA' => 'AFRIQUE DU SUD',
'AX' => 'ÅLAND, ÎLES',
@@ -514,7 +514,7 @@ function getCountries($lng = 'fr')
'YE' => 'YÉMEN',
'ZM' => 'ZAMBIE',
'ZW' => 'ZIMBABWE'
);
];
if ( ! isset($countries[$lng]))
$lng = 'us';
foreach ($countries[$lng] as $k => $country)

View File

@@ -40,7 +40,7 @@ function giveMeBases(Application $app, $usr = null)
AND usr.usr_id = :usr_id AND model_of = 0';
$stmt = $conn->prepare($sqlU);
$stmt->execute(array(':usr_id' => $usr));
$stmt->execute([':usr_id' => $usr]);
$rsU = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
@@ -72,7 +72,7 @@ function giveMeBases(Application $app, $usr = null)
foreach ($app['phraseanet.appbox']->get_databoxes() as $databox) {
$collname = $basname = null;
$sbas_id = $databox->get_sbas_id();
$inscriptions[$sbas_id] = array();
$inscriptions[$sbas_id] = [];
$inscriptions[$sbas_id]['CGU'] = false;
$inscriptions[$sbas_id]['CGUrelease'] = false;
$inscriptions[$sbas_id]['inscript'] = false;
@@ -293,7 +293,7 @@ function giveMeBaseUsr(Application $app, $usr)
$out .= '</table>';
return array('tab' => $out, 'demandes' => $noDemand);
return ['tab' => $out, 'demandes' => $noDemand];
}
function giveModInscript($usr, $lng)