Skip to content

Commit

Permalink
PHPLIB-1529 Remove usage of deprecated event getServer
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Sep 18, 2024
1 parent 89fb97a commit 7ead6ff
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 @@ -317,7 +317,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 @@ -433,7 +433,7 @@ private function resume(array|object|null $resumeToken = null, bool $hasAdvanced
*
* @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 7ead6ff

Please sign in to comment.