mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-04 19:18:41 +00:00
Remove namespace from scalars
This commit is contained in:
parent
ab619f5a1d
commit
a9a95d3dd2
|
|
@ -46,7 +46,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Module path.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_PATH = __DIR__;
|
||||
|
|
@ -54,7 +54,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Module version.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_VERSION = '1.0.0';
|
||||
|
|
@ -62,7 +62,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Module name.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_NAME = 'News';
|
||||
|
|
@ -70,7 +70,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Localization files.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $localization = [
|
||||
|
|
@ -80,7 +80,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [];
|
||||
|
|
@ -88,7 +88,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [
|
||||
|
|
@ -235,7 +235,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getNewsListR(\int $limit = 50, \int $offset = 0, \string $orderBy = 'news_created', \string $ordered = 'ASC', Account $account = null)
|
||||
public function getNewsListR(int $limit = 50, int $offset = 0, string $orderBy = 'news_created', string $ordered = 'ASC', Account $account = null)
|
||||
{
|
||||
$newsArticleMapper = new NewsArticleMapper($this->app->dbPool->get());
|
||||
$query = $newsArticleMapper->find('news.news_id', 'news.news_author', 'news.news_publish', 'news.news_title')
|
||||
|
|
@ -266,7 +266,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getHeadlineListR(\int $limit = 50, \int $offset = 0, \string $orderBy = 'news_created', \string $ordered = 'ASC', Account $account = null)
|
||||
public function getHeadlineListR(int $limit = 50, int $offset = 0, string $orderBy = 'news_created', string $ordered = 'ASC', Account $account = null)
|
||||
{
|
||||
$newsArticleMapper = new NewsArticleMapper($this->app->dbPool->get());
|
||||
$query = $newsArticleMapper->find('news.news_id', 'news.news_author', 'news.news_publish', 'news.news_title')
|
||||
|
|
@ -293,7 +293,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
private function createNavigation(\int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||
private function createNavigation(int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
$nav = Navigation::getInstance($request, $this->app->dbPool);
|
||||
$navView = new NavigationView($this->app, $request, $response);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class NewsArticle
|
|||
/**
|
||||
* Article ID.
|
||||
*
|
||||
* @var \int
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $id = 0;
|
||||
|
|
@ -43,7 +43,7 @@ class NewsArticle
|
|||
/**
|
||||
* Author ID.
|
||||
*
|
||||
* @var \int
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $author = 0;
|
||||
|
|
@ -51,7 +51,7 @@ class NewsArticle
|
|||
/**
|
||||
* Title.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $title = '';
|
||||
|
|
@ -59,7 +59,7 @@ class NewsArticle
|
|||
/**
|
||||
* Content.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $content = '';
|
||||
|
|
@ -67,7 +67,7 @@ class NewsArticle
|
|||
/**
|
||||
* Plain.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $plain = '';
|
||||
|
|
@ -75,7 +75,7 @@ class NewsArticle
|
|||
/**
|
||||
* News type.
|
||||
*
|
||||
* @var \int
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $type = NewsType::ARTICLE;
|
||||
|
|
@ -83,7 +83,7 @@ class NewsArticle
|
|||
/**
|
||||
* News status.
|
||||
*
|
||||
* @var \int
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $status = NewsStatus::VISIBLE;
|
||||
|
|
@ -91,7 +91,7 @@ class NewsArticle
|
|||
/**
|
||||
* Language.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $lang = ISO639Enum::_EN;
|
||||
|
|
@ -115,7 +115,7 @@ class NewsArticle
|
|||
/**
|
||||
* Featured.
|
||||
*
|
||||
* @var \bool
|
||||
* @var bool
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $featured = false;
|
||||
|
|
@ -133,36 +133,36 @@ class NewsArticle
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \int
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getAuthor() : \int
|
||||
public function getAuthor() : int
|
||||
{
|
||||
return $this->author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \string
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getContent() : \string
|
||||
public function getContent() : string
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \string $content
|
||||
* @param string $content
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setContent(\string $content)
|
||||
public function setContent(string $content)
|
||||
{
|
||||
$this->content = $content;
|
||||
}
|
||||
|
|
@ -179,60 +179,60 @@ class NewsArticle
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \int
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getId() : \int
|
||||
public function getId() : int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \int $id Id
|
||||
* @param int $id Id
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setId(\int $id)
|
||||
public function setId(int $id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \string
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getLanguage() : \string
|
||||
public function getLanguage() : string
|
||||
{
|
||||
return $this->lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \string
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getPlain() : \string
|
||||
public function getPlain() : string
|
||||
{
|
||||
return $this->plain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \string $plain
|
||||
* @param string $plain
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setPlain(\string $plain)
|
||||
public function setPlain(string $plain)
|
||||
{
|
||||
$this->plain = $plain;
|
||||
}
|
||||
|
|
@ -249,14 +249,14 @@ class NewsArticle
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \string $lang
|
||||
* @param string $lang
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setLang(\string $lang)
|
||||
public function setLang(string $lang)
|
||||
{
|
||||
$this->lang = $lang;
|
||||
}
|
||||
|
|
@ -288,110 +288,110 @@ class NewsArticle
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \int $author
|
||||
* @param int $author
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setAuthor(\int $author)
|
||||
public function setAuthor(int $author)
|
||||
{
|
||||
$this->author = $author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \string
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getTitle() : \string
|
||||
public function getTitle() : string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \string $title
|
||||
* @param string $title
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setTitle(\string $title)
|
||||
public function setTitle(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \int
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getType() : \int
|
||||
public function getType() : int
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \int $type
|
||||
* @param int $type
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setType(\int $type)
|
||||
public function setType(int $type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \int
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function getStatus() : \int
|
||||
public function getStatus() : int
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \int $status
|
||||
* @param int $status
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setStatus(\int $status)
|
||||
public function setStatus(int $status)
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \bool
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function isFeatured() : \bool
|
||||
public function isFeatured() : bool
|
||||
{
|
||||
return $this->featured;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \bool $featured
|
||||
* @param bool $featured
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function setFeatured(\bool $featured)
|
||||
public function setFeatured(bool $featured)
|
||||
{
|
||||
$this->featured = $featured;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class NewsArticleMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Primary table.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $table = 'news';
|
||||
|
|
@ -52,7 +52,7 @@ class NewsArticleMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Primary field name.
|
||||
*
|
||||
* @var \string
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $primaryField = 'id';
|
||||
|
|
@ -62,7 +62,7 @@ class NewsArticleMapper extends DataMapperAbstract
|
|||
*
|
||||
* @param mixed $obj News article
|
||||
*
|
||||
* @return \bool
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ class NewsList
|
|||
* This function gets all accounts in a range
|
||||
*
|
||||
* @param array $filter Filter for search results
|
||||
* @param \int $offset Offset for first account
|
||||
* @param \int $limit Limit for results
|
||||
* @param int $offset Offset for first account
|
||||
* @param int $limit Limit for results
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user