diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0cd0013..1c7ad2a 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -21,7 +21,6 @@ use Modules\Editor\Models\EditorDocHistory; use Modules\Editor\Models\EditorDocHistoryMapper; use Modules\Editor\Models\EditorDocMapper; use Modules\Editor\Models\EditorDocType; -use phpOMS\Localization\BaseStringL11n; use Modules\Editor\Models\EditorDocTypeL11nMapper; use Modules\Editor\Models\EditorDocTypeMapper; use Modules\Media\Models\CollectionMapper; @@ -31,6 +30,7 @@ use Modules\Media\Models\PathSettings; use Modules\Media\Models\Reference; use Modules\Media\Models\ReferenceMapper; use Modules\Tag\Models\NullTag; +use phpOMS\Localization\BaseStringL11n; use phpOMS\Message\Http\HttpResponse; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\NotificationLevel; @@ -178,8 +178,8 @@ final class ApiController extends Controller */ private function createEditorDocTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n { - $l11nEditorDocType = new BaseStringL11n(); - $l11nEditorDocType->ref = (int) ($request->getData('type') ?? 0); + $l11nEditorDocType = new BaseStringL11n(); + $l11nEditorDocType->ref = (int) ($request->getData('type') ?? 0); $l11nEditorDocType->content = (string) ($request->getData('title') ?? ''); $l11nEditorDocType->setLanguage((string) ( $request->getData('language') ?? $request->getLanguage() diff --git a/Models/EditorDocType.php b/Models/EditorDocType.php index b6225b3..bd37d77 100755 --- a/Models/EditorDocType.php +++ b/Models/EditorDocType.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Modules\Editor\Models; -use phpOMS\Localization\ISO639x1Enum; use phpOMS\Localization\BaseStringL11n; +use phpOMS\Localization\ISO639x1Enum; /** * EditorDoc type class. @@ -91,7 +91,7 @@ class EditorDocType implements \JsonSerializable * Set title * * @param string|BaseStringL11n $title EditorDoc article title - * @param string $lang Language + * @param string $lang Language * * @return void * @@ -104,7 +104,7 @@ class EditorDocType implements \JsonSerializable } elseif ($this->title instanceof BaseStringL11n) { $this->title->content = $title; } else { - $this->title = new BaseStringL11n(); + $this->title = new BaseStringL11n(); $this->title->content = $title; $this->title->setLanguage($lang); }