Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Oct 22, 2023
1 parent 775f726 commit f9e6c35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector;
use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Set\ValueObject\LevelSetList;

Expand All @@ -17,6 +18,8 @@
$rectorConfig->sets([LevelSetList::UP_TO_PHP_74]);

$rectorConfig->skip([
// Do not use ternaries extensively
IfIssetToCoalescingRector::class,
// Not necessary in documentation examples
JsonThrowOnErrorRector::class => [

Check failure on line 24 in rector.php

View workflow job for this annotation

GitHub Actions / phpcs

Key specified for array entry; first entry has no key
__DIR__ . '/tests/DocumentationExamplesTest.php',
Expand Down
10 changes: 9 additions & 1 deletion src/Operation/Watch.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,15 @@ private function getInitialResumeToken()
return $this->postBatchResumeToken;
}

return $this->changeStreamOptions['startAfter'] ?? $this->changeStreamOptions['resumeAfter'] ?? null;
if (isset($this->changeStreamOptions['startAfter'])) {
return $this->changeStreamOptions['startAfter'];
}

if (isset($this->changeStreamOptions['resumeAfter'])) {
return $this->changeStreamOptions['resumeAfter'];
}

return null;
}

/**
Expand Down

0 comments on commit f9e6c35

Please sign in to comment.