Use short array syntax

[MAILPOET-2090]
This commit is contained in:
Pavel Dohnal
2019-05-20 13:48:48 +02:00
committed by M. Shull
parent 9f16cb6a5f
commit 5da7110eb6
385 changed files with 40133 additions and 40131 deletions

View File

@ -20,9 +20,9 @@ class Settings extends APIEndpoint {
/** @var SettingsController */
private $settings;
public $permissions = array(
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS
);
public $permissions = [
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS,
];
function __construct(SettingsController $settings) {
$this->settings = $settings;
@ -32,13 +32,13 @@ class Settings extends APIEndpoint {
return $this->successResponse($this->settings->getAll());
}
function set($settings = array()) {
function set($settings = []) {
if (empty($settings)) {
return $this->badRequest(
array(
[
APIError::BAD_REQUEST =>
WPFunctions::get()->__('You have not specified any settings to be saved.', 'mailpoet')
));
WPFunctions::get()->__('You have not specified any settings to be saved.', 'mailpoet'),
]);
} else {
$original_inactivation_interval = (int)$this->settings->get('deactivate_subscriber_after_inactive_days');
// Will be uncommented on task [MAILPOET-1998]