Automated formatting changes

This commit is contained in:
Formatter Bot 2021-04-04 15:13:09 +00:00
parent f7c6dcce70
commit d4378c1af1
5 changed files with 10 additions and 12 deletions

View File

@ -103,11 +103,11 @@ final class ApiController extends Controller
*/ */
private function updateCommentListFromRequest(RequestAbstract $request) : Comment private function updateCommentListFromRequest(RequestAbstract $request) : Comment
{ {
$list = CommentListMapper::get((int) $request->getData('id')); $list = CommentListMapper::get((int) $request->getData('id'));
$list->allowEdit = (bool) ($request->getData('allow_edit') ?? $list->allowEdit); $list->allowEdit = (bool) ($request->getData('allow_edit') ?? $list->allowEdit);
$list->allowVoting = (bool) ($request->getData('allow_voting') ?? $list->allowVoting); $list->allowVoting = (bool) ($request->getData('allow_voting') ?? $list->allowVoting);
$list->allowFiles = (bool) ($request->getData('allow_upload') ?? $list->allowFiles); $list->allowFiles = (bool) ($request->getData('allow_upload') ?? $list->allowFiles);
$list->status = (int) ($request->getData('commentlist_status') ?? $list->status); $list->status = (int) ($request->getData('commentlist_status') ?? $list->status);
return $list; return $list;
} }

View File

@ -15,8 +15,8 @@ declare(strict_types=1);
namespace Modules\Comments\Models; namespace Modules\Comments\Models;
use Modules\Admin\Models\Account; use Modules\Admin\Models\Account;
use Modules\Media\Models\Media;
use Modules\Admin\Models\NullAccount; use Modules\Admin\Models\NullAccount;
use Modules\Media\Models\Media;
/** /**
* Task class. * Task class.

View File

@ -14,8 +14,6 @@ declare(strict_types=1);
namespace Modules\Comments\Models; namespace Modules\Comments\Models;
use Modules\Media\Models\Media;
/** /**
* Task class. * Task class.
* *

View File

@ -33,10 +33,10 @@ final class CommentListMapper extends DataMapperAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $columns = [ protected static array $columns = [
'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'],
'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'bool', 'internal' => 'status'], '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_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_edit' => ['name' => 'comments_list_allow_edit', 'type' => 'bool', 'internal' => 'allowEdit'],
'comments_list_allow_files' => ['name' => 'comments_list_allow_files', 'type' => 'bool', 'internal' => 'allowFiles'], 'comments_list_allow_files' => ['name' => 'comments_list_allow_files', 'type' => 'bool', 'internal' => 'allowFiles'],
]; ];

View File

@ -15,8 +15,8 @@ declare(strict_types=1);
namespace Modules\Comments\Models; namespace Modules\Comments\Models;
use Modules\Admin\Models\AccountMapper; use Modules\Admin\Models\AccountMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use Modules\Media\Models\MediaMapper; use Modules\Media\Models\MediaMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
/** /**
* Mapper class. * Mapper class.