Add space between if and ‘(‘
[MAILPOET-1791]
This commit is contained in:
@ -9,7 +9,7 @@ use MailPoet\Listing;
|
||||
use MailPoet\Models\Segment;
|
||||
use MailPoet\Segments\WP;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
class Segments extends APIEndpoint {
|
||||
public $permissions = array(
|
||||
@ -33,7 +33,7 @@ class Segments extends APIEndpoint {
|
||||
function get($data = array()) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$segment = Segment::findOne($id);
|
||||
if($segment === false) {
|
||||
if ($segment === false) {
|
||||
return $this->errorResponse(array(
|
||||
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
|
||||
));
|
||||
@ -67,7 +67,7 @@ class Segments extends APIEndpoint {
|
||||
$segment = Segment::createOrUpdate($data);
|
||||
$errors = $segment->getErrors();
|
||||
|
||||
if(!empty($errors)) {
|
||||
if (!empty($errors)) {
|
||||
return $this->badRequest($errors);
|
||||
} else {
|
||||
return $this->successResponse(
|
||||
@ -79,7 +79,7 @@ class Segments extends APIEndpoint {
|
||||
function restore($data = array()) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$segment = Segment::findOne($id);
|
||||
if($segment === false) {
|
||||
if ($segment === false) {
|
||||
return $this->errorResponse(array(
|
||||
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
|
||||
));
|
||||
@ -95,7 +95,7 @@ class Segments extends APIEndpoint {
|
||||
function trash($data = array()) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$segment = Segment::findOne($id);
|
||||
if($segment === false) {
|
||||
if ($segment === false) {
|
||||
return $this->errorResponse(array(
|
||||
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
|
||||
));
|
||||
@ -111,7 +111,7 @@ class Segments extends APIEndpoint {
|
||||
function delete($data = array()) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$segment = Segment::findOne($id);
|
||||
if($segment === false) {
|
||||
if ($segment === false) {
|
||||
return $this->errorResponse(array(
|
||||
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
|
||||
));
|
||||
@ -125,7 +125,7 @@ class Segments extends APIEndpoint {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$segment = Segment::findOne($id);
|
||||
|
||||
if($segment === false) {
|
||||
if ($segment === false) {
|
||||
return $this->errorResponse(array(
|
||||
APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
|
||||
));
|
||||
@ -136,7 +136,7 @@ class Segments extends APIEndpoint {
|
||||
$duplicate = $segment->duplicate($data);
|
||||
$errors = $duplicate->getErrors();
|
||||
|
||||
if(!empty($errors)) {
|
||||
if (!empty($errors)) {
|
||||
return $this->errorResponse($errors);
|
||||
} else {
|
||||
return $this->successResponse(
|
||||
|
Reference in New Issue
Block a user