doc fixes

This commit is contained in:
Dennis Eichhorn 2022-04-21 23:52:00 +02:00
parent 63dd586412
commit 52f699c070
4 changed files with 18 additions and 14 deletions

View File

@ -16,7 +16,7 @@ Generally, the development philosophy is result orientated. This means that anyo
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
Open tasks can be found in the project overview: [PROJECT.md](../Project/PROJECT.md)
Open tasks can be found in the project overview: [PROJECT.md](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.

View File

@ -93,7 +93,7 @@ final class ApiController extends Controller
*
* @since 1.0.0
*/
public function apiNewsUpdate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
public function apiNewsUpdate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
$old = clone NewsArticleMapper::get()->where('id', (int) $request->getData('id'))->execute();
$new = $this->updateNewsFromRequest($request);
@ -139,7 +139,7 @@ final class ApiController extends Controller
*
* @since 1.0.0
*/
public function apiNewsCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
public function apiNewsCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
if (!empty($val = $this->validateNewsCreate($request))) {
$response->set('news_create', new FormValidation($val));
@ -329,7 +329,7 @@ final class ApiController extends Controller
*
* @since 1.0.0
*/
public function apiNewsGet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
public function apiNewsGet(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
$news = NewsArticleMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'News', 'News successfully returned', $news);
@ -348,7 +348,7 @@ final class ApiController extends Controller
*
* @since 1.0.0
*/
public function apiNewsDelete(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
public function apiNewsDelete(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{
$news = NewsArticleMapper::get()->with('media')->with('tags')->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $news, NewsArticleMapper::class, 'news', $request->getOrigin());

View File

@ -51,7 +51,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
@ -89,6 +89,7 @@ final class BackendController extends Controller implements DashboardElementInte
$ids[] = $news->getId();
}
/** @var \Modules\NEws\Models\NewsSeen[] $seenObjects */
$seenObjects = NewsSeenMapper::getAll()
->where('seenBy', $request->header->account)
->where('news', $ids, 'in')
@ -108,11 +109,12 @@ final class BackendController extends Controller implements DashboardElementInte
* {@inheritdoc}
* @codeCoverageIgnore
*/
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/News/Theme/Backend/dashboard-news');
/** @var \Modules\News\Models\NewsArticle[] $news */
$news = NewsArticleMapper::getAll()
->with('createdBy')
->with('tags')
@ -142,10 +144,11 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsArticle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsArticle(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
/** @var \Modules\News\Models\NewsArticle $news */
$article = NewsArticleMapper::get()
->with('createdBy')
->with('comments')
@ -172,6 +175,7 @@ final class BackendController extends Controller implements DashboardElementInte
return $view;
}
/** @var \Modules\News\Models\NewsSeen $seen */
$seen = NewsSeenMapper::get()
->where('news', (int) $request->getData('id'))
->where('seenBy', $request->header->account)
@ -219,7 +223,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsArchive(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsArchive(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
@ -267,7 +271,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsDraftList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsDraftList(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
@ -301,7 +305,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
@ -332,7 +336,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsEdit(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsEdit(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
@ -365,7 +369,7 @@ final class BackendController extends Controller implements DashboardElementInte
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNewsAnalysis(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
public function viewNewsAnalysis(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);

View File

@ -67,7 +67,7 @@ final class NewsArticleMapper extends DataMapperFactory
/**
* Belongs to.
*
* @var array<string, array{mapper:string, external:string}>
* @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
* @since 1.0.0
*/
public const BELONGS_TO = [