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

@@ -16,9 +16,9 @@ class UserFlags extends APIEndpoint {
/** @var UserFlagsController */
private $user_flags;
public $permissions = array(
'global' => AccessControl::ALL_ROLES_ACCESS
);
public $permissions = [
'global' => AccessControl::ALL_ROLES_ACCESS,
];
function __construct(UserFlagsController $user_flags) {
$this->user_flags = $user_flags;
@@ -27,10 +27,10 @@ class UserFlags extends APIEndpoint {
function set(array $flags = []) {
if (empty($flags)) {
return $this->badRequest(
array(
[
APIError::BAD_REQUEST =>
WPFunctions::get()->__('You have not specified any user flags to be saved.', 'mailpoet')
));
WPFunctions::get()->__('You have not specified any user flags to be saved.', 'mailpoet'),
]);
} else {
foreach ($flags as $name => $value) {
$this->user_flags->set($name, $value);