From 8cf249716a8eb6573149a9dcd62e7ff9d6d54b1f Mon Sep 17 00:00:00 2001 From: Formatter Bot Date: Sat, 5 Jun 2021 09:06:32 +0000 Subject: [PATCH] Automated formatting changes --- Controller/ApiController.php | 12 ++++++------ Models/CommentVoteMapper.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index c650a3d..2f823c3 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -18,12 +18,12 @@ namespace Modules\Comments\Controller; use Modules\Admin\Models\NullAccount; use Modules\Comments\Models\Comment; -use Modules\Comments\Models\CommentVote; -use Modules\Comments\Models\NullCommentVote; -use Modules\Comments\Models\CommentVoteMapper; use Modules\Comments\Models\CommentList; use Modules\Comments\Models\CommentListMapper; use Modules\Comments\Models\CommentMapper; +use Modules\Comments\Models\CommentVote; +use Modules\Comments\Models\CommentVoteMapper; +use Modules\Comments\Models\NullCommentVote; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\NotificationLevel; use phpOMS\Message\RequestAbstract; @@ -290,14 +290,14 @@ final class ApiController extends Controller $vote = CommentVoteMapper::findVote((int) $reqeust->getData('id'), $request->header->account); if ($vote instanceof NullCommentVote) { - $new = new CommentVote(); - $new->score = (int) $request->getData('type'); + $new = new CommentVote(); + $new->score = (int) $request->getData('type'); $new->createdBy = $request->header->account; $this->createModel($request->header->account, $new, CommentVoteMapper::class, 'comment_vote', $request->getOrigin()); $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Vote', 'Sucessfully voted.', $new); } else { - $new = clone $vote; + $new = clone $vote; $new->score = (int) $request->getData('type'); $this->updateModel($request->header->account, $vote, $new, CommentVoteMapper::class, 'comment_vote', $request->getOrigin()); diff --git a/Models/CommentVoteMapper.php b/Models/CommentVoteMapper.php index bc4d9fd..c927513 100644 --- a/Models/CommentVoteMapper.php +++ b/Models/CommentVoteMapper.php @@ -34,8 +34,8 @@ final class CommentVoteMapper extends DataMapperAbstract */ protected static array $columns = [ 'comments_comment_vote_id' => ['name' => 'comments_comment_vote_id', 'type' => 'int', 'internal' => 'id'], - 'comments_comment_vote_score' => ['name' => 'comments_comment_vote_score', 'type' => 'int', 'internal' => 'score'], - 'comments_comment_vote_comment' => ['name' => 'comments_comment_vote_comment', 'type' => 'int', 'internal' => 'comment', 'readonly' => true], + 'comments_comment_vote_score' => ['name' => 'comments_comment_vote_score', 'type' => 'int', 'internal' => 'score'], + 'comments_comment_vote_comment' => ['name' => 'comments_comment_vote_comment', 'type' => 'int', 'internal' => 'comment', 'readonly' => true], 'comments_comment_vote_created_by' => ['name' => 'comments_comment_vote_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], 'comments_comment_vote_created_at' => ['name' => 'comments_comment_vote_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], ];