From d4378c1af12ac27d0d5f5fef3e15178dab27b474 Mon Sep 17 00:00:00 2001 From: Formatter Bot Date: Sun, 4 Apr 2021 15:13:09 +0000 Subject: [PATCH] Automated formatting changes --- Controller/ApiController.php | 8 ++++---- Models/Comment.php | 2 +- Models/CommentList.php | 2 -- Models/CommentListMapper.php | 8 ++++---- Models/CommentMapper.php | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index c953627..7c122cf 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -103,11 +103,11 @@ final class ApiController extends Controller */ private function updateCommentListFromRequest(RequestAbstract $request) : Comment { - $list = CommentListMapper::get((int) $request->getData('id')); - $list->allowEdit = (bool) ($request->getData('allow_edit') ?? $list->allowEdit); + $list = CommentListMapper::get((int) $request->getData('id')); + $list->allowEdit = (bool) ($request->getData('allow_edit') ?? $list->allowEdit); $list->allowVoting = (bool) ($request->getData('allow_voting') ?? $list->allowVoting); - $list->allowFiles = (bool) ($request->getData('allow_upload') ?? $list->allowFiles); - $list->status = (int) ($request->getData('commentlist_status') ?? $list->status); + $list->allowFiles = (bool) ($request->getData('allow_upload') ?? $list->allowFiles); + $list->status = (int) ($request->getData('commentlist_status') ?? $list->status); return $list; } diff --git a/Models/Comment.php b/Models/Comment.php index 801a9c4..981e008 100755 --- a/Models/Comment.php +++ b/Models/Comment.php @@ -15,8 +15,8 @@ declare(strict_types=1); namespace Modules\Comments\Models; use Modules\Admin\Models\Account; -use Modules\Media\Models\Media; use Modules\Admin\Models\NullAccount; +use Modules\Media\Models\Media; /** * Task class. diff --git a/Models/CommentList.php b/Models/CommentList.php index 92f164a..e0cb72d 100755 --- a/Models/CommentList.php +++ b/Models/CommentList.php @@ -14,8 +14,6 @@ declare(strict_types=1); namespace Modules\Comments\Models; -use Modules\Media\Models\Media; - /** * Task class. * diff --git a/Models/CommentListMapper.php b/Models/CommentListMapper.php index 4b74035..62c10d7 100755 --- a/Models/CommentListMapper.php +++ b/Models/CommentListMapper.php @@ -33,10 +33,10 @@ final class CommentListMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $columns = [ - 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], - 'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'bool', 'internal' => 'status'], - 'comments_list_allow_voting' => ['name' => 'comments_list_allow_voting', 'type' => 'bool', 'internal' => 'allowVoting'], - 'comments_list_allow_edit' => ['name' => 'comments_list_allow_edit', 'type' => 'bool', 'internal' => 'allowEdit'], + 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], + 'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'bool', 'internal' => 'status'], + 'comments_list_allow_voting' => ['name' => 'comments_list_allow_voting', 'type' => 'bool', 'internal' => 'allowVoting'], + 'comments_list_allow_edit' => ['name' => 'comments_list_allow_edit', 'type' => 'bool', 'internal' => 'allowEdit'], 'comments_list_allow_files' => ['name' => 'comments_list_allow_files', 'type' => 'bool', 'internal' => 'allowFiles'], ]; diff --git a/Models/CommentMapper.php b/Models/CommentMapper.php index f782ce1..f789b61 100755 --- a/Models/CommentMapper.php +++ b/Models/CommentMapper.php @@ -15,8 +15,8 @@ declare(strict_types=1); namespace Modules\Comments\Models; use Modules\Admin\Models\AccountMapper; -use phpOMS\DataStorage\Database\DataMapperAbstract; use Modules\Media\Models\MediaMapper; +use phpOMS\DataStorage\Database\DataMapperAbstract; /** * Mapper class.