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
{
$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;
}

View File

@ -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.

View File

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

View File

@ -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'],
];

View File

@ -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.