Add public keyword to methods

[MAILPOET-2413]
This commit is contained in:
Amine Ben hammou
2019-12-26 12:56:49 +01:00
committed by wxa
parent ec409042d5
commit 43df66d162
823 changed files with 4440 additions and 4440 deletions

View File

@ -12,7 +12,7 @@ class BatchIterator implements \Iterator, \Countable {
private $last_processed_id = 0;
private $batch_last_id;
function __construct($task_id, $batch_size) {
public function __construct($task_id, $batch_size) {
if ($task_id <= 0) {
throw new \Exception('Task ID must be greater than zero');
} elseif ($batch_size <= 0) {
@ -22,11 +22,11 @@ class BatchIterator implements \Iterator, \Countable {
$this->batch_size = (int)$batch_size;
}
function rewind() {
public function rewind() {
$this->last_processed_id = 0;
}
function current() {
public function current() {
$subscribers = $this->getSubscribers()
->orderByAsc('subscriber_id')
->limit($this->batch_size)
@ -36,19 +36,19 @@ class BatchIterator implements \Iterator, \Countable {
return $subscribers;
}
function key() {
public function key() {
return null;
}
function next() {
public function next() {
$this->last_processed_id = $this->batch_last_id;
}
function valid() {
public function valid() {
return $this->count() > 0;
}
function count() {
public function count() {
return $this->getSubscribers()->count();
}