diff --git a/Admin/Update.php b/Admin/Update.php index 412cb6d..6d75b92 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -19,7 +19,6 @@ use phpOMS\Module\UpdateAbstract; use phpOMS\System\File\Directory; use phpOMS\Module\InfoManager; - /** * Navigation class. * diff --git a/Controller.php b/Controller.php index 28f39b0..b596759 100644 --- a/Controller.php +++ b/Controller.php @@ -241,8 +241,7 @@ class Controller extends ModuleAbstract implements WebInterface private function validateNewsCreate(RequestAbstract $request) : array { $val = []; - if ( - ($val['title'] = empty($request->getData('title'))) + if (($val['title'] = empty($request->getData('title'))) || ($val['plain'] = empty($request->getData('plain'))) || ($val['lang'] = ( $request->getData('lang') !== null @@ -313,8 +312,7 @@ class Controller extends ModuleAbstract implements WebInterface private function validateBadgeCreate(RequestAbstract $request) : array { $val = []; - if ( - ($val['title'] = empty($request->getData('title'))) + if (($val['title'] = empty($request->getData('title'))) ) { return $val; } diff --git a/Models/Badge.php b/Models/Badge.php index 30b431f..0489490 100644 --- a/Models/Badge.php +++ b/Models/Badge.php @@ -47,4 +47,4 @@ class Badge { return $this->name; } -} \ No newline at end of file +} diff --git a/Models/NewsArticle.php b/Models/NewsArticle.php index 1151e1c..11f2e27 100644 --- a/Models/NewsArticle.php +++ b/Models/NewsArticle.php @@ -133,7 +133,7 @@ class NewsArticle implements ArrayableInterface, \JsonSerializable public function __construct() { $this->createdAt = new \DateTime('now'); - $this->publish = new \DateTime('now'); + $this->publish = new \DateTime('now'); } public function getBadges() : array diff --git a/Models/NewsStatus.php b/Models/NewsStatus.php index dff3715..544d900 100644 --- a/Models/NewsStatus.php +++ b/Models/NewsStatus.php @@ -27,5 +27,5 @@ use phpOMS\Stdlib\Base\Enum; abstract class NewsStatus extends Enum { /* public */ const VISIBLE = 0; - /* public */ const DRAFT = 1; + /* public */ const DRAFT = 1; } diff --git a/Models/NewsType.php b/Models/NewsType.php index f6324d8..d986c53 100644 --- a/Models/NewsType.php +++ b/Models/NewsType.php @@ -26,7 +26,7 @@ use phpOMS\Stdlib\Base\Enum; */ abstract class NewsType extends Enum { - /* public */ const ARTICLE = 0; - /* public */ const LINK = 1; + /* public */ const ARTICLE = 0; + /* public */ const LINK = 1; /* public */ const HEADLINE = 2; } diff --git a/Models/PermissionState.php b/Models/PermissionState.php index ca35204..990325c 100644 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -27,7 +27,7 @@ use phpOMS\Stdlib\Base\Enum; abstract class PermissionState extends Enum { /* public */ const DASHBOARD = 1; - /* public */ const ARCHIVE = 2; - /* public */ const ARTICLE = 3; - /* public */ const BADGE = 4; + /* public */ const ARCHIVE = 2; + /* public */ const ARTICLE = 3; + /* public */ const BADGE = 4; }