phpcs fixes

This commit is contained in:
Dennis Eichhorn 2020-11-28 00:13:12 +01:00
parent a1b0f6ad60
commit 49eec36689
4 changed files with 8 additions and 9 deletions

View File

@ -47,7 +47,7 @@ final class Installer extends InstallerAbstract
$id = WikiAppMapper::create($app);
$category = new WikiCategory();
$category = new WikiCategory();
$category->app = new NullWikiApp($id);
$category->setName('Default');
@ -61,7 +61,7 @@ final class Installer extends InstallerAbstract
$id = WikiAppMapper::create($app);
$category = new WikiCategory();
$category = new WikiCategory();
$category->app = new NullWikiApp($id);
$category->setName('Default');
}

View File

@ -85,10 +85,10 @@ final class ApiController extends Controller
*/
public function createWikiDocFromRequest(RequestAbstract $request, ResponseAbstract $response, $data = null) : WikiDoc
{
$doc = new WikiDoc();
$doc->name = (string) $request->getData('title');
$doc->doc = Markdown::parse((string) ($request->getData('plain') ?? ''));
$doc->docRaw = (string) ($request->getData('plain') ?? '');
$doc = new WikiDoc();
$doc->name = (string) $request->getData('title');
$doc->doc = Markdown::parse((string) ($request->getData('plain') ?? ''));
$doc->docRaw = (string) ($request->getData('plain') ?? '');
$doc->category = new NullWikiCategory((int) ($request->getData('category') ?? 1));
$doc->setLanguage((string) ($request->getData('language') ?? $request->getLanguage()));
$doc->setStatus((int) ($request->getData('status') ?? WikiStatus::INACTIVE));
@ -334,7 +334,7 @@ final class ApiController extends Controller
*/
public function createWikiCategoryFromRequest(RequestAbstract $request) : WikiCategory
{
$category = new WikiCategory();
$category = new WikiCategory();
$category->app = new NullWikiApp((int) ($request->getData('app') ?? 1));
if ($request->getData('parent') !== null) {

View File

@ -15,7 +15,6 @@ declare(strict_types=1);
namespace Modules\Knowledgebase\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\Localization\Defaults\LanguageMapper;
/**
* Category mapper class.

View File

@ -113,7 +113,7 @@ final class WikiDocMapper extends DataMapperAbstract
{
$query ??= self::getQuery(null, [], $relations, $depth);
$query->where(static::$table . '_' . $depth . '.' . 'wiki_article_app', '=', $app)
$query->where(static::$table . '_' . $depth . '.wiki_article_app', '=', $app)
->limit($limit);
if (!empty(static::$createdAt)) {