Fix spaces in assignments
[MAILPOET-3912]
This commit is contained in:
@@ -99,7 +99,7 @@ class Forms extends APIEndpoint {
|
||||
|
||||
if (!$status) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class Forms extends APIEndpoint {
|
||||
|
||||
if (!in_array($status, [FormEntity::STATUS_ENABLED, FormEntity::STATUS_DISABLED])) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST =>
|
||||
APIError::BAD_REQUEST =>
|
||||
sprintf(
|
||||
__('Invalid status. Allowed values are (%1$s), you specified %2$s', 'mailpoet'),
|
||||
join(', ', [FormEntity::STATUS_ENABLED, FormEntity::STATUS_DISABLED]),
|
||||
|
@@ -107,11 +107,11 @@ class ImportExport extends APIEndpoint {
|
||||
return $this->successResponse($response);
|
||||
} catch (ValidationException $exception) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('Please specify a name.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('Please specify a name.', 'mailpoet'),
|
||||
]);
|
||||
} catch (InvalidArgumentException $exception) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('Another record already exists. Please specify a different "name".', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('Another record already exists. Please specify a different "name".', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -162,7 +162,7 @@ class Newsletters extends APIEndpoint {
|
||||
|
||||
if (!$status) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -123,11 +123,11 @@ class Segments extends APIEndpoint {
|
||||
$segment = $this->segmentSavecontroller->save($data);
|
||||
} catch (ValidationException $exception) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('Please specify a name.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('Please specify a name.', 'mailpoet'),
|
||||
]);
|
||||
} catch (ConflictException $exception) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => __('Another record already exists. Please specify a different "name".', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => __('Another record already exists. Please specify a different "name".', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
$response = $this->segmentsResponseBuilder->build($segment);
|
||||
|
@@ -76,7 +76,7 @@ class Services extends APIEndpoint {
|
||||
|
||||
if (!$key) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ class Services extends APIEndpoint {
|
||||
|
||||
if (!$key) {
|
||||
return $this->badRequest([
|
||||
APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'),
|
||||
APIError::BAD_REQUEST => $this->wp->__('Please specify a key.', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user