Skip to content

Commit 3b28528

Browse files
committed
Rename isFirstBatchEmpty variable
1 parent 989056d commit 3b28528

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/ChangeStream.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ class ChangeStream implements Iterator
6363
* @internal
6464
* @param Cursor $cursor
6565
* @param callable $resumeCallable
66-
* @param boolean $isFirstBatchIsEmpty
66+
* @param boolean $isFirstBatchEmpty
6767
*/
68-
public function __construct(Cursor $cursor, callable $resumeCallable, $isFirstBatchIsEmpty)
68+
public function __construct(Cursor $cursor, callable $resumeCallable, $isFirstBatchEmpty)
6969
{
7070
$this->resumeCallable = $resumeCallable;
71-
$this->csIt = new TailableCursorIterator($cursor, $isFirstBatchIsEmpty);
71+
$this->csIt = new TailableCursorIterator($cursor, $isFirstBatchEmpty);
7272
}
7373

7474
/**
@@ -243,9 +243,9 @@ private function onIteration($incrementKey)
243243
*/
244244
private function resume()
245245
{
246-
list($cursor, $isFirstBatchIsEmpty) = call_user_func($this->resumeCallable, $this->resumeToken);
246+
list($cursor, $isFirstBatchEmpty) = call_user_func($this->resumeCallable, $this->resumeToken);
247247

248-
$this->csIt = new TailableCursorIterator($cursor, $isFirstBatchIsEmpty);
248+
$this->csIt = new TailableCursorIterator($cursor, $isFirstBatchEmpty);
249249
$this->csIt->rewind();
250250

251251
$this->onIteration($this->hasAdvanced);

src/Model/TailableCursorIterator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ class TailableCursorIterator extends IteratorIterator
3838
*
3939
* @internal
4040
* @param Cursor $cursor
41-
* @param boolean $isFirstBatchIsEmpty
41+
* @param boolean $isFirstBatchEmpty
4242
*/
43-
public function __construct(Cursor $cursor, $isFirstBatchIsEmpty)
43+
public function __construct(Cursor $cursor, $isFirstBatchEmpty)
4444
{
4545
parent::__construct($cursor);
46-
$this->isRewindNop = $isFirstBatchIsEmpty;
46+
$this->isRewindNop = $isFirstBatchEmpty;
4747
}
4848

4949
/**

src/Operation/Watch.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Watch implements Executable, /* @internal */ CommandSubscriber
5757
private $changeStreamOptions;
5858
private $collectionName;
5959
private $databaseName;
60-
private $isFirstBatchIsEmpty = false;
60+
private $isFirstBatchEmpty = false;
6161
private $operationTime;
6262
private $pipeline;
6363
private $resumeCallable;
@@ -206,7 +206,7 @@ final public function commandStarted(CommandStartedEvent $event)
206206
}
207207

208208
$this->operationTime = null;
209-
$this->isFirstBatchIsEmpty = false;
209+
$this->isFirstBatchEmpty = false;
210210
}
211211

212212
/** @internal */
@@ -223,7 +223,7 @@ final public function commandSucceeded(CommandSucceededEvent $event)
223223
}
224224

225225
if (isset($reply->cursor->firstBatch) && is_array($reply->cursor->firstBatch)) {
226-
$this->isFirstBatchIsEmpty = empty($reply->cursor->firstBatch);
226+
$this->isFirstBatchEmpty = empty($reply->cursor->firstBatch);
227227
}
228228
}
229229

@@ -240,7 +240,7 @@ public function execute(Server $server)
240240
{
241241
$cursor = $this->executeAggregate($server);
242242

243-
return new ChangeStream($cursor, $this->resumeCallable, $this->isFirstBatchIsEmpty);
243+
return new ChangeStream($cursor, $this->resumeCallable, $this->isFirstBatchEmpty);
244244
}
245245

246246
/**
@@ -283,7 +283,7 @@ private function createResumeCallable(Manager $manager)
283283
$this->aggregate = $this->createAggregate();
284284
$cursor = $this->executeAggregate($server);
285285

286-
return [$cursor, $this->isFirstBatchIsEmpty];
286+
return [$cursor, $this->isFirstBatchEmpty];
287287
};
288288
}
289289

0 commit comments

Comments
 (0)