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 29, 2023
1 parent 388fdc2 commit 7b1f7a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace FoF\BestAnswer;

use Carbon\Carbon;
use DateTime;
use Flarum\Api\Controller\ListPostsController;
use Flarum\Api\Controller\ListUsersController;
use Flarum\Api\Controller\ShowDiscussionController;
Expand Down
11 changes: 10 additions & 1 deletion src/BasicDiscussionAttributes.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/best-answer.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\BestAnswer;

use Flarum\Api\Serializer\BasicDiscussionSerializer;
Expand All @@ -11,7 +20,7 @@ public function __invoke(BasicDiscussionSerializer $serializer, Discussion $disc
{
$attributes['hasBestAnswer'] = $discussion->bestAnswerPost !== null ? $discussion->bestAnswerPost->id : false;
$attributes['bestAnswerSetAt'] = $discussion->best_answer_set_at ? $discussion->best_answer_set_at->toRFC3339String() : null;

return $attributes;
}
}

0 comments on commit 7b1f7a2

Please sign in to comment.