mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 09:11:40 +08:00
Applied fixes from StyleCI
This commit is contained in:
parent
648cad1a38
commit
b59268b856
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
@ -10,8 +11,8 @@
|
||||
|
||||
namespace Flarum\Sticky\Gambit;
|
||||
|
||||
use Flarum\Core\Search\AbstractSearch;
|
||||
use Flarum\Core\Search\AbstractRegexGambit;
|
||||
use Flarum\Core\Search\AbstractSearch;
|
||||
|
||||
class StickyGambit extends AbstractRegexGambit
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
@ -51,6 +52,7 @@ class PinStickiedDiscussionsToTop
|
||||
foreach ($search->getActiveGambits() as $gambit) {
|
||||
if ($gambit instanceof TagGambit) {
|
||||
array_unshift($query->orders, ['column' => 'is_sticky', 'direction' => 'desc']);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
@ -11,9 +12,9 @@
|
||||
namespace Flarum\Sticky\Listener;
|
||||
|
||||
use Flarum\Core\Access\AssertPermissionTrait;
|
||||
use Flarum\Event\DiscussionWillBeSaved;
|
||||
use Flarum\Sticky\Event\DiscussionWasStickied;
|
||||
use Flarum\Sticky\Event\DiscussionWasUnstickied;
|
||||
use Flarum\Event\DiscussionWillBeSaved;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class SaveStickyToDatabase
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
@ -50,19 +51,19 @@ class DiscussionStickiedPost extends AbstractEventPost implements MergeableInter
|
||||
/**
|
||||
* Create a new instance in reply to a discussion.
|
||||
*
|
||||
* @param integer $discussionId
|
||||
* @param integer $userId
|
||||
* @param boolean $isSticky
|
||||
* @param int $discussionId
|
||||
* @param int $userId
|
||||
* @param bool $isSticky
|
||||
* @return static
|
||||
*/
|
||||
public static function reply($discussionId, $userId, $isSticky)
|
||||
{
|
||||
$post = new static;
|
||||
|
||||
$post->content = static::buildContent($isSticky);
|
||||
$post->time = time();
|
||||
$post->content = static::buildContent($isSticky);
|
||||
$post->time = time();
|
||||
$post->discussion_id = $discussionId;
|
||||
$post->user_id = $userId;
|
||||
$post->user_id = $userId;
|
||||
|
||||
return $post;
|
||||
}
|
||||
@ -70,7 +71,7 @@ class DiscussionStickiedPost extends AbstractEventPost implements MergeableInter
|
||||
/**
|
||||
* Build the content attribute.
|
||||
*
|
||||
* @param boolean $isSticky Whether or not the discussion is stickied.
|
||||
* @param bool $isSticky Whether or not the discussion is stickied.
|
||||
* @return array
|
||||
*/
|
||||
public static function buildContent($isSticky)
|
||||
|
Loading…
x
Reference in New Issue
Block a user