Add space between foreach and ‘(‘
[MAILPOET-1791]
This commit is contained in:
@ -10,7 +10,7 @@ class AutomatedLatestContentTest extends \MailPoetTest {
|
||||
$endpoint = new AutomatedLatestContent(new \MailPoet\Newsletter\AutomatedLatestContent(), new WPFunctions);
|
||||
$response = $endpoint->getPostTypes();
|
||||
expect($response->data)->notEmpty();
|
||||
foreach($response->data as $post_type) {
|
||||
foreach ($response->data as $post_type) {
|
||||
expect($post_type)->count(2);
|
||||
expect($post_type['name'])->notEmpty();
|
||||
expect($post_type['label'])->notEmpty();
|
||||
|
@ -53,7 +53,7 @@ class CustomFieldsTest extends \MailPoetTest {
|
||||
|
||||
function _before() {
|
||||
parent::_before();
|
||||
foreach($this->custom_fields as $custom_field) {
|
||||
foreach ($this->custom_fields as $custom_field) {
|
||||
CustomField::createOrUpdate($custom_field);
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ class CustomFieldsTest extends \MailPoetTest {
|
||||
expect($response->status)->equals(APIResponse::STATUS_OK);
|
||||
expect($response->data)->count(count($this->custom_fields));
|
||||
|
||||
foreach($response->data as $custom_field) {
|
||||
foreach ($response->data as $custom_field) {
|
||||
expect($custom_field['name'])->notEmpty();
|
||||
expect($custom_field['type'])->notEmpty();
|
||||
expect($custom_field['params'])->notEmpty();
|
||||
|
@ -97,7 +97,7 @@ class NewsletterTemplatesTest extends \MailPoetTest {
|
||||
|
||||
$normalize = function($array) {
|
||||
$result = array();
|
||||
foreach($array as $key => $value) {
|
||||
foreach ($array as $key => $value) {
|
||||
if(in_array($key, ['newsletter_id', 'name', 'body'])) {
|
||||
$result[$key] = $value;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ class NewslettersTest extends \MailPoetTest {
|
||||
'nthWeekDay',
|
||||
'schedule'
|
||||
);
|
||||
foreach($newsletter_options as $option) {
|
||||
foreach ($newsletter_options as $option) {
|
||||
$newsletter_option_field = NewsletterOptionField::create();
|
||||
$newsletter_option_field->name = $option;
|
||||
$newsletter_option_field->newsletter_type = Newsletter::TYPE_NOTIFICATION;
|
||||
@ -293,7 +293,7 @@ class NewslettersTest extends \MailPoetTest {
|
||||
'nthWeekDay',
|
||||
'schedule'
|
||||
);
|
||||
foreach($newsletter_options as $option) {
|
||||
foreach ($newsletter_options as $option) {
|
||||
$newsletter_option_field = NewsletterOptionField::create();
|
||||
$newsletter_option_field->name = $option;
|
||||
$newsletter_option_field->newsletter_type = Newsletter::TYPE_NOTIFICATION;
|
||||
|
@ -90,7 +90,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
}
|
||||
|
||||
private function _createOrUpdateNewsletterOptions($newsletter_id, $newsletter_type, $options) {
|
||||
foreach($options as $option => $value) {
|
||||
foreach ($options as $option => $value) {
|
||||
$newsletter_option_field = NewsletterOptionField::where('name', $option)->findOne();
|
||||
if(!$newsletter_option_field) {
|
||||
$newsletter_option_field = NewsletterOptionField::create();
|
||||
|
@ -154,7 +154,7 @@ class ServicesTest extends \MailPoetTest {
|
||||
);
|
||||
$response = $this->services_endpoint->checkPremiumKey($this->data);
|
||||
expect($response->status)->equals(APIResponse::STATUS_OK);
|
||||
foreach(array_keys(Installer::getPremiumStatus()) as $key) {
|
||||
foreach (array_keys(Installer::getPremiumStatus()) as $key) {
|
||||
expect(isset($response->meta[$key]))->true();
|
||||
}
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ class SubscribersTest extends \MailPoetTest {
|
||||
'schedule' => '* * * * *'
|
||||
);
|
||||
|
||||
foreach($welcome_newsletter_options as $option => $value) {
|
||||
foreach ($welcome_newsletter_options as $option => $value) {
|
||||
$newsletter_option_field = NewsletterOptionField::create();
|
||||
$newsletter_option_field->name = $option;
|
||||
$newsletter_option_field->newsletter_type = Newsletter::TYPE_WELCOME;
|
||||
|
Reference in New Issue
Block a user