diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /apps/user_ldap/ajax/wizard.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/user_ldap/ajax/wizard.php')
-rw-r--r-- | apps/user_ldap/ajax/wizard.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index 3cce732f070..1756e978de2 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -36,13 +36,13 @@ $l = \OC::$server->getL10N('user_ldap'); if(!isset($_POST['action'])) { - \OC_JSON::error(array('message' => $l->t('No action specified'))); + \OC_JSON::error(['message' => $l->t('No action specified')]); } $action = (string)$_POST['action']; if(!isset($_POST['ldap_serverconfig_chooser'])) { - \OC_JSON::error(array('message' => $l->t('No configuration specified'))); + \OC_JSON::error(['message' => $l->t('No configuration specified')]); } $prefix = (string)$_POST['ldap_serverconfig_chooser']; @@ -99,7 +99,7 @@ switch($action) { exit; } } catch (\Exception $e) { - \OC_JSON::error(array('message' => $e->getMessage(), 'code' => $e->getCode())); + \OC_JSON::error(['message' => $e->getMessage(), 'code' => $e->getCode()]); exit; } \OC_JSON::error(); @@ -115,7 +115,7 @@ switch($action) { exit; } } catch (\Exception $e) { - \OC_JSON::error(array('message' => $e->getMessage())); + \OC_JSON::error(['message' => $e->getMessage()]); exit; } \OC_JSON::error(); @@ -127,15 +127,15 @@ switch($action) { $key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false; $val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null; if($key === false || is_null($val)) { - \OC_JSON::error(array('message' => $l->t('No data specified'))); + \OC_JSON::error(['message' => $l->t('No data specified')]); exit; } - $cfg = array($key => $val); - $setParameters = array(); + $cfg = [$key => $val]; + $setParameters = []; $configuration->setConfiguration($cfg, $setParameters); if(!in_array($key, $setParameters)) { - \OC_JSON::error(array('message' => $l->t($key. - ' Could not set configuration %s', $setParameters[0]))); + \OC_JSON::error(['message' => $l->t($key. + ' Could not set configuration %s', $setParameters[0])]); exit; } $configuration->saveConfiguration(); @@ -145,6 +145,6 @@ switch($action) { \OC_JSON::success(); break; default: - \OC_JSON::error(array('message' => $l->t('Action does not exist'))); + \OC_JSON::error(['message' => $l->t('Action does not exist')]); break; } |