Skip to content

Commit

Permalink
PHPLIB-1529 Remove usage of deprecated event getServer (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Sep 18, 2024
1 parent c5a384a commit 45998dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Operation/Watch.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ final public function commandSucceeded(CommandSucceededEvent $event): void
}

if (
$this->shouldCaptureOperationTime($event->getServer()) &&
$this->shouldCaptureOperationTime() &&
isset($reply->operationTime) && $reply->operationTime instanceof TimestampInterface
) {
$this->operationTime = $reply->operationTime;
Expand Down Expand Up @@ -445,7 +445,7 @@ private function resume($resumeToken = null, bool $hasAdvanced = false): ChangeS
*
* @see https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst#startatoperationtime
*/
private function shouldCaptureOperationTime(Server $server): bool
private function shouldCaptureOperationTime(): bool
{
if ($this->hasResumed) {
return false;
Expand Down

0 comments on commit 45998dd

Please sign in to comment.