Convert variable names to camel case

[MAILPOET-1796]
This commit is contained in:
Jan Jakeš
2020-01-09 15:02:58 +01:00
committed by Jan Jakeš
parent f5da704106
commit 54549ff037
687 changed files with 15890 additions and 15887 deletions

View File

@ -16,8 +16,8 @@ class DynamicSubscribersGetter extends SubscribersGetter {
/** @var WPFunctions */
private $wp;
public function __construct($segments_ids, $batch_size, WPFunctions $wp = null) {
parent::__construct($segments_ids, $batch_size);
public function __construct($segmentsIds, $batchSize, WPFunctions $wp = null) {
parent::__construct($segmentsIds, $batchSize);
if ($wp == null) {
$wp = new WPFunctions;
}
@ -26,22 +26,22 @@ class DynamicSubscribersGetter extends SubscribersGetter {
public function reset() {
parent::reset();
$this->segment_index = 0;
$this->segmentIndex = 0;
}
protected function filter($subscribers) {
$segment_id = $this->segments_ids[$this->segment_index];
$segmentId = $this->segmentsIds[$this->segmentIndex];
$filters = $this->wp->applyFilters(
'mailpoet_get_segment_filters',
$segment_id
$segmentId
);
if (!is_array($filters) || empty($filters)) {
return [];
}
$segment = Segment::findOne($segment_id);
$segment = Segment::findOne($segmentId);
if (!$segment instanceof Segment) {
return [];
}
@ -57,19 +57,19 @@ class DynamicSubscribersGetter extends SubscribersGetter {
])
->selectExpr("'" . $name . "' AS segment_name")
->offset($this->offset)
->limit($this->batch_size)
->limit($this->batchSize)
->findArray();
}
public function get() {
if ($this->segment_index >= count($this->segments_ids)) {
if ($this->segmentIndex >= count($this->segmentsIds)) {
$this->finished = true;
}
$subscribers = parent::get();
if ($subscribers !== false && count($subscribers) < $this->batch_size) {
$this->segment_index ++;
if ($subscribers !== false && count($subscribers) < $this->batchSize) {
$this->segmentIndex ++;
$this->offset = 0;
$this->finished = false;
}