mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Apply fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
58fa8d4b8c
commit
2da4f8204e
@@ -19,9 +19,9 @@ use Flarum\Post\Event\Hidden;
|
||||
use Flarum\Post\Event\Posted;
|
||||
use Flarum\Post\Event\Restored;
|
||||
use Flarum\Subscriptions\HideIgnoredFromAllDiscussionsPage;
|
||||
use Flarum\Subscriptions\Query\SubscriptionFilterGambit;
|
||||
use Flarum\Subscriptions\Listener;
|
||||
use Flarum\Subscriptions\Notification\NewPostBlueprint;
|
||||
use Flarum\Subscriptions\Query\SubscriptionFilterGambit;
|
||||
|
||||
return [
|
||||
(new Extend\Frontend('forum'))
|
||||
|
@@ -18,7 +18,8 @@ use Illuminate\Database\Query\Builder;
|
||||
|
||||
class SubscriptionFilterGambit extends AbstractRegexGambit implements FilterInterface
|
||||
{
|
||||
protected function getGambitPattern() {
|
||||
protected function getGambitPattern()
|
||||
{
|
||||
return 'is:(follow|ignor)(?:ing|ed)';
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ class SubscriptionFilterGambit extends AbstractRegexGambit implements FilterInte
|
||||
|
||||
public function filter(FilterState $filterState, string $filterValue, bool $negate)
|
||||
{
|
||||
preg_match('/^' . $this->getGambitPattern().'$/i', 'is:'.$filterValue, $matches);
|
||||
preg_match('/^'.$this->getGambitPattern().'$/i', 'is:'.$filterValue, $matches);
|
||||
|
||||
$this->constrain($filterState->getQuery(), $filterState->getActor(), $matches[1], $negate);
|
||||
}
|
||||
|
Reference in New Issue
Block a user