Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfox committed Mar 18, 2024
1 parent 5a2eb93 commit 937702a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/FeatureFlagsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ protected function schedulingMacros()
/** @noRector \Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector */
Event::macro('skipWithoutFeature', fn (string $feature): Event =>
/** @var Event $this */
/** @phpstan-ignore-next-line annoying issue with macros */
$this->skip(fn () => ! Features::accessible($feature)));
}

if (! Event::hasMacro('skipWithFeature')) {
/** @noRector \Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector */
Event::macro('skipWithFeature', fn ($feature): Event =>
/** @var Event $this */
/** @phpstan-ignore-next-line annoying issue with macros */
$this->skip(fn () => Features::accessible($feature)));
}
}
Expand Down

0 comments on commit 937702a

Please sign in to comment.