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

@@ -13,9 +13,9 @@ use MailPoet\Subscribers\ImportExport\Import\MailChimp;
if (!defined('ABSPATH')) exit;
class ImportExport extends APIEndpoint {
public $permissions = array(
'global' => AccessControl::PERMISSION_MANAGE_SUBSCRIBERS
);
public $permissions = [
'global' => AccessControl::PERMISSION_MANAGE_SUBSCRIBERS,
];
function getMailChimpLists($data) {
try {
@@ -23,9 +23,9 @@ class ImportExport extends APIEndpoint {
$lists = $mailChimp->getLists();
return $this->successResponse($lists);
} catch (\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
));
return $this->errorResponse([
$e->getCode() => $e->getMessage(),
]);
}
}
@@ -35,9 +35,9 @@ class ImportExport extends APIEndpoint {
$subscribers = $mailChimp->getSubscribers($data['lists']);
return $this->successResponse($subscribers);
} catch (\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
));
return $this->errorResponse([
$e->getCode() => $e->getMessage(),
]);
}
}
@@ -62,9 +62,9 @@ class ImportExport extends APIEndpoint {
$process = $import->process();
return $this->successResponse($process);
} catch (\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
));
return $this->errorResponse([
$e->getCode() => $e->getMessage(),
]);
}
}
@@ -76,9 +76,9 @@ class ImportExport extends APIEndpoint {
$process = $export->process();
return $this->successResponse($process);
} catch (\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
));
return $this->errorResponse([
$e->getCode() => $e->getMessage(),
]);
}
}