Fix spacing around commas

This commit is contained in:
Tautvidas Sipavičius
2016-06-30 14:03:07 +03:00
parent b7d8d482fe
commit b7e3c3ae81
3 changed files with 9 additions and 7 deletions

View File

@ -42,9 +42,11 @@ class SendingQueue {
}
// get subscribers
$queue->subscribers = SubscribersTask::get($queue->subscribers);
foreach(array_chunk($queue->subscribers['to_process'], self::BATCH_SIZE)
as $subscribers_to_process_ids
) {
$subscriber_batches = array_chunk(
$queue->subscribers['to_process'],
self::BATCH_SIZE
);
foreach($subscriber_batches as $subscribers_to_process_ids) {
$found_subscribers = SubscriberModel::whereIn('id', $subscribers_to_process_ids)
->findArray();
$found_subscribers_ids = Helpers::arrayColumn($found_subscribers, 'id');

View File

@ -666,8 +666,8 @@ class Subscriber extends Model {
'(' . implode(', ', $columns) . ') ' .
'VALUES ' . rtrim(
str_repeat(
'(' . rtrim(str_repeat('?,', count($columns)), ',') . ')' . ', '
, count($values)
'(' . rtrim(str_repeat('?,', count($columns)), ',') . ')' . ', ',
count($values)
),
', '
),

View File

@ -58,8 +58,8 @@ class SubscriberCustomField extends Model {
'(custom_field_id, subscriber_id, value) ' .
'VALUES ' . rtrim(
str_repeat(
'(?, ?, ?)' . ', '
, count($values)
'(?, ?, ?)' . ', ',
count($values)
), ', '
),
Helpers::flattenArray($values)