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

@@ -12,9 +12,9 @@ if (!defined('ABSPATH')) exit;
class Setup extends APIEndpoint {
private $wp;
public $permissions = array(
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS
);
public $permissions = [
'global' => AccessControl::PERMISSION_MANAGE_SETTINGS,
];
function __construct(WPFunctions $wp) {
$this->wp = $wp;
@@ -28,9 +28,9 @@ class Setup extends APIEndpoint {
$this->wp->doAction('mailpoet_setup_reset');
return $this->successResponse();
} catch (\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
));
return $this->errorResponse([
$e->getCode() => $e->getMessage(),
]);
}
}
}