Add space between catch and ‘(‘
[MAILPOET-1791]
This commit is contained in:
@@ -293,7 +293,7 @@ class Forms extends APIEndpoint {
|
||||
try {
|
||||
$meta = $this->bulk_action->apply('\MailPoet\Models\Form', $data);
|
||||
return $this->successResponse(null, $meta);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -19,7 +19,7 @@ class ImportExport extends APIEndpoint {
|
||||
$mailChimp = new MailChimp($data['api_key']);
|
||||
$lists = $mailChimp->getLists();
|
||||
return $this->successResponse($lists);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -31,7 +31,7 @@ class ImportExport extends APIEndpoint {
|
||||
$mailChimp = new MailChimp($data['api_key']);
|
||||
$subscribers = $mailChimp->getSubscribers($data['lists']);
|
||||
return $this->successResponse($subscribers);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -58,7 +58,7 @@ class ImportExport extends APIEndpoint {
|
||||
);
|
||||
$process = $import->process();
|
||||
return $this->successResponse($process);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -72,10 +72,10 @@ class ImportExport extends APIEndpoint {
|
||||
);
|
||||
$process = $export->process();
|
||||
return $this->successResponse($process);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class MP2Migrator extends APIEndpoint {
|
||||
try {
|
||||
$process = $this->MP2Migrator->import($data);
|
||||
return $this->successResponse($process);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -44,7 +44,7 @@ class MP2Migrator extends APIEndpoint {
|
||||
try {
|
||||
$process = $this->MP2Migrator->stopImport();
|
||||
return $this->successResponse($process);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -61,7 +61,7 @@ class MP2Migrator extends APIEndpoint {
|
||||
try {
|
||||
$process = $this->MP2Migrator->skipImport();
|
||||
return $this->successResponse($process);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -22,7 +22,7 @@ class Mailer extends APIEndpoint {
|
||||
(isset($data['reply_to'])) ? $data['reply_to'] : false
|
||||
);
|
||||
$result = $mailer->send($data['newsletter'], $data['subscriber']);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -394,7 +394,7 @@ class Newsletters extends APIEndpoint {
|
||||
Newsletter::findOne($id)->asArray()
|
||||
);
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -464,7 +464,7 @@ class Newsletters extends APIEndpoint {
|
||||
try {
|
||||
$meta = $this->bulk_action->apply('\MailPoet\Models\Newsletter', $data);
|
||||
return $this->successResponse(null, $meta);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -150,7 +150,7 @@ class Segments extends APIEndpoint {
|
||||
function synchronize() {
|
||||
try {
|
||||
WP::synchronizeUsers();
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -163,7 +163,7 @@ class Segments extends APIEndpoint {
|
||||
try {
|
||||
$meta = $this->bulk_action->apply('\MailPoet\Models\Segment', $data);
|
||||
return $this->successResponse(null, $meta);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -36,7 +36,7 @@ class SendingQueue extends APIEndpoint {
|
||||
// check that the sending method has been configured properly
|
||||
try {
|
||||
new \MailPoet\Mailer\Mailer(false);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -37,7 +37,7 @@ class Services extends APIEndpoint {
|
||||
try {
|
||||
$result = $this->bridge->checkMSSKey($key);
|
||||
$this->bridge->storeMSSKeyAndState($key, $result);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
@@ -99,7 +99,7 @@ class Services extends APIEndpoint {
|
||||
try {
|
||||
$result = $this->bridge->checkPremiumKey($key);
|
||||
$this->bridge->storePremiumKeyAndState($key, $result);
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -27,7 +27,7 @@ class Setup extends APIEndpoint {
|
||||
$activator->activate();
|
||||
$this->wp->doAction('mailpoet_setup_reset');
|
||||
return $this->successResponse();
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
@@ -300,7 +300,7 @@ class Subscribers extends APIEndpoint {
|
||||
$bulk_action = new BulkAction($data);
|
||||
return $this->successResponse(null, $bulk_action->apply());
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
return $this->errorResponse(array(
|
||||
$e->getCode() => $e->getMessage()
|
||||
));
|
||||
|
Reference in New Issue
Block a user