mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-02-09 23:08:42 +00:00
phpcs fixes
This commit is contained in:
parent
a1b0f6ad60
commit
49eec36689
|
|
@ -47,7 +47,7 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$id = WikiAppMapper::create($app);
|
$id = WikiAppMapper::create($app);
|
||||||
|
|
||||||
$category = new WikiCategory();
|
$category = new WikiCategory();
|
||||||
$category->app = new NullWikiApp($id);
|
$category->app = new NullWikiApp($id);
|
||||||
$category->setName('Default');
|
$category->setName('Default');
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$id = WikiAppMapper::create($app);
|
$id = WikiAppMapper::create($app);
|
||||||
|
|
||||||
$category = new WikiCategory();
|
$category = new WikiCategory();
|
||||||
$category->app = new NullWikiApp($id);
|
$category->app = new NullWikiApp($id);
|
||||||
$category->setName('Default');
|
$category->setName('Default');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,10 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
public function createWikiDocFromRequest(RequestAbstract $request, ResponseAbstract $response, $data = null) : WikiDoc
|
public function createWikiDocFromRequest(RequestAbstract $request, ResponseAbstract $response, $data = null) : WikiDoc
|
||||||
{
|
{
|
||||||
$doc = new WikiDoc();
|
$doc = new WikiDoc();
|
||||||
$doc->name = (string) $request->getData('title');
|
$doc->name = (string) $request->getData('title');
|
||||||
$doc->doc = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
$doc->doc = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||||
$doc->docRaw = (string) ($request->getData('plain') ?? '');
|
$doc->docRaw = (string) ($request->getData('plain') ?? '');
|
||||||
$doc->category = new NullWikiCategory((int) ($request->getData('category') ?? 1));
|
$doc->category = new NullWikiCategory((int) ($request->getData('category') ?? 1));
|
||||||
$doc->setLanguage((string) ($request->getData('language') ?? $request->getLanguage()));
|
$doc->setLanguage((string) ($request->getData('language') ?? $request->getLanguage()));
|
||||||
$doc->setStatus((int) ($request->getData('status') ?? WikiStatus::INACTIVE));
|
$doc->setStatus((int) ($request->getData('status') ?? WikiStatus::INACTIVE));
|
||||||
|
|
@ -334,7 +334,7 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
public function createWikiCategoryFromRequest(RequestAbstract $request) : WikiCategory
|
public function createWikiCategoryFromRequest(RequestAbstract $request) : WikiCategory
|
||||||
{
|
{
|
||||||
$category = new WikiCategory();
|
$category = new WikiCategory();
|
||||||
$category->app = new NullWikiApp((int) ($request->getData('app') ?? 1));
|
$category->app = new NullWikiApp((int) ($request->getData('app') ?? 1));
|
||||||
|
|
||||||
if ($request->getData('parent') !== null) {
|
if ($request->getData('parent') !== null) {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
||||||
namespace Modules\Knowledgebase\Models;
|
namespace Modules\Knowledgebase\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
use phpOMS\Localization\Defaults\LanguageMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category mapper class.
|
* Category mapper class.
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ final class WikiDocMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
$query ??= self::getQuery(null, [], $relations, $depth);
|
$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);
|
->limit($limit);
|
||||||
|
|
||||||
if (!empty(static::$createdAt)) {
|
if (!empty(static::$createdAt)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user