Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Oct 18, 2023
1 parent 6367017 commit f27c5e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
6 changes: 3 additions & 3 deletions framework/core/src/Post/CommentPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public function restore(): static
$this->raise(new Restored($this));

$this->saved(function (self $model) {
if ($model === $this) {
$model->fireModelEvent('restored', false);
}
if ($model === $this) {
$model->fireModelEvent('restored', false);
}
});
}

Expand Down
24 changes: 7 additions & 17 deletions framework/core/tests/integration/extenders/SearchIndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,11 @@

use Carbon\Carbon;
use Flarum\Discussion\Discussion;
use Flarum\Discussion\Search\DiscussionSearcher;
use Flarum\Extend;
use Flarum\Post\CommentPost;
use Flarum\Search\AbstractFulltextFilter;
use Flarum\Search\Database\DatabaseSearchDriver;
use Flarum\Search\Database\DatabaseSearchState;
use Flarum\Search\Filter\FilterInterface;
use Flarum\Search\IndexerInterface;
use Flarum\Search\SearchCriteria;
use Flarum\Search\SearchManager;
use Flarum\Search\SearchState;
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
use Flarum\Testing\integration\TestCase;
use Flarum\User\User;
use PHPUnit\Framework\Assert;

class SearchIndexTest extends TestCase
Expand Down Expand Up @@ -72,15 +63,14 @@ public function test_indexer_triggered_on_create(string $type, string $modelClas
'attributes' => [
$attribute => 'test',
],
'relationships' =>
($type === 'posts' ? [
'discussion' => [
'data' => [
'type' => 'discussions',
'id' => 1,
],
'relationships' => ($type === 'posts' ? [
'discussion' => [
'data' => [
'type' => 'discussions',
'id' => 1,
],
] : null),
],
] : null),
]
],
]),
Expand Down

0 comments on commit f27c5e9

Please sign in to comment.