diff --git a/admin/blocksadmin.php b/admin/blocksadmin.php index 4e3611ab..eaf5d4da 100644 --- a/admin/blocksadmin.php +++ b/admin/blocksadmin.php @@ -54,7 +54,7 @@ function listBlocks() require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; $moduleDirName = basename(dirname(__DIR__)); $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName - $db = \XoopsDatabaseFactory::getDatabaseConnection(); + $db = \XoopsDatabaseFactory::getDatabaseConnection(); xoops_loadLanguage('admin', 'system'); xoops_loadLanguage('admin/blocksadmin', 'system'); xoops_loadLanguage('admin/groups', 'system'); @@ -332,13 +332,13 @@ function cloneBlock($bid) } /** - * @param int $bid - * @param string $bside - * @param int $bweight - * @param bool $bvisible - * @param int $bcachetime - * @param array $bmodule - * @param null|array $options + * @param int $bid + * @param string $bside + * @param int $bweight + * @param bool $bvisible + * @param int $bcachetime + * @param array $bmodule + * @param null|array|string $options */ function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null) { diff --git a/admin/item.php b/admin/item.php index ece50334..6ca60542 100644 --- a/admin/item.php +++ b/admin/item.php @@ -31,7 +31,7 @@ } $itemid = Request::getInt('itemid', Request::getInt('itemid', 0, 'POST'), 'GET'); -$op = ($itemid > 0 || Request::getString('editor', '', 'POST')) ? 'mod' : ''; +$op = ($itemid > 0 || Request::getString('editor', '', 'POST')) ? 'mod' : ''; //$op = Request::getString('op', $op, 'GET'); $op = Request::getString('op', Request::getString('op', $op, 'POST'), 'GET'); diff --git a/archive.php b/archive.php index 49c9af5f..c74625c1 100644 --- a/archive.php +++ b/archive.php @@ -89,7 +89,7 @@ if (!($itemsCount > 0)) { redirect_header(XOOPS_URL, 2, _MD_PUBLISHER_NO_TOP_PERMISSIONS); -//mb exit; + //mb exit; } else { $years = []; $months = []; diff --git a/blocks/date_to_date.php b/blocks/date_to_date.php index 48888a1c..9914f48b 100644 --- a/blocks/date_to_date.php +++ b/blocks/date_to_date.php @@ -45,8 +45,8 @@ function publisher_date_to_date_show($options) $criteria->setOrder('DESC'); // creating the ITEM objects that belong to the selected category - $itemsObj = $helper->getHandler('Item')->getObjects($criteria); -// $totalItems = count($itemsObj); + $itemsObj = $helper->getHandler('Item')->getObjects($criteria); + // $totalItems = count($itemsObj); if (is_array($itemsObj) && count($itemsObj) > 0) { foreach ($itemsObj as $iValue) { diff --git a/class/BaseObjectHandler.php b/class/BaseObjectHandler.php index 1465848b..48761170 100644 --- a/class/BaseObjectHandler.php +++ b/class/BaseObjectHandler.php @@ -197,7 +197,7 @@ public function insert(\XoopsObject $obj, $force = false)// insert($obj, $force /** * Create a "select" SQL query * - * @param \CriteriaElement $criteria {@link \CriteriaElement} to match + * @param \CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} to match * * @return string SQL query */ @@ -218,7 +218,7 @@ private function selectQuery(\CriteriaElement $criteria = null) /** * count objects matching a criteria * - * @param \CriteriaElement $criteria {@link CriteriaElement} + * @param \CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} * to match * * @return int count of objects @@ -267,7 +267,7 @@ public function delete(\XoopsObject $obj, $force = false) //delete($obj, $force /** * delete department matching a set of conditions * - * @param \CriteriaElement $criteria {@link CriteriaElement} + * @param \CriteriaElement|\CriteriaCompo $criteria {@link CriteriaElement} * * @param bool $force * @param bool $asObject @@ -291,7 +291,7 @@ public function deleteAll(\CriteriaElement $criteria = null, $force = true, $asO * * @param string $fieldname * @param string $fieldvalue - * @param \CriteriaElement $criteria {@link \CriteriaElement} + * @param \CriteriaElement|\CriteriaCompo $criteria {@link \CriteriaElement} * * @param bool $force * @return bool FALSE if update failed diff --git a/class/BlockForm.php b/class/BlockForm.php index db096d0e..78c704d8 100644 --- a/class/BlockForm.php +++ b/class/BlockForm.php @@ -21,6 +21,7 @@ * @since 1.0 * @author trabis */ + use XoopsModules\Publisher; // defined('XOOPS_ROOT_PATH') || die('Restricted access'); diff --git a/class/Cloner.php b/class/Cloner.php index d7a0071f..a5b09c89 100644 --- a/class/Cloner.php +++ b/class/Cloner.php @@ -3,10 +3,12 @@ namespace XoopsModules\Publisher; use XoopsModules\Publisher; + /** * Class Cloner */ -class Cloner { +class Cloner +{ // recursive cloning script /** * @param $path diff --git a/class/Common/Breadcrumb.php b/class/Common/Breadcrumb.php index 7c9c07fc..52430441 100644 --- a/class/Common/Breadcrumb.php +++ b/class/Common/Breadcrumb.php @@ -33,7 +33,7 @@ */ class Breadcrumb { - public $dirname; + public $dirname; private $bread = []; public function __construct() @@ -50,7 +50,7 @@ public function __construct() public function addLink($title = '', $link = '') { $this->bread[] = [ - 'link' => $link, + 'link' => $link, 'title' => $title, ]; } diff --git a/class/Common/Configurator.php b/class/Common/Configurator.php index 4f06bb98..4e077ed3 100644 --- a/class/Common/Configurator.php +++ b/class/Common/Configurator.php @@ -11,6 +11,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ + /** * Configurator Class * @@ -20,6 +21,7 @@ * @package Publisher * @since 1.05 */ + use XoopsModules\Publisher; /** @@ -28,13 +30,13 @@ class Configurator { public $name; - public $paths = []; - public $uploadFolders = []; - public $copyBlankFiles = []; + public $paths = []; + public $uploadFolders = []; + public $copyBlankFiles = []; public $copyTestFolders = []; public $templateFolders = []; - public $oldFiles = []; - public $oldFolders = []; + public $oldFiles = []; + public $oldFolders = []; public $modCopyright; /** @@ -43,19 +45,19 @@ class Configurator public function __construct() { $moduleDirName = basename(dirname(dirname(__DIR__))); - $capsDirName = mb_strtoupper($moduleDirName); + $capsDirName = mb_strtoupper($moduleDirName); require dirname(dirname(__DIR__)) . '/include/config.php'; $config = getConfig(); - $this->name = $config->name; - $this->paths = $config->paths; - $this->uploadFolders = $config->uploadFolders; - $this->copyBlankFiles = $config->copyBlankFiles; + $this->name = $config->name; + $this->paths = $config->paths; + $this->uploadFolders = $config->uploadFolders; + $this->copyBlankFiles = $config->copyBlankFiles; $this->copyTestFolders = $config->copyTestFolders; $this->templateFolders = $config->templateFolders; - $this->oldFiles = $config->oldFiles; - $this->oldFolders = $config->oldFolders; - $this->modCopyright = $config->modCopyright; + $this->oldFiles = $config->oldFiles; + $this->oldFolders = $config->oldFolders; + $this->modCopyright = $config->modCopyright; } } diff --git a/class/Common/ServerStats.php b/class/Common/ServerStats.php index 2096935c..d54905ec 100644 --- a/class/Common/ServerStats.php +++ b/class/Common/ServerStats.php @@ -27,7 +27,7 @@ trait ServerStats public static function getServerStats() { //mb $wfdownloads = WfdownloadsWfdownloads::getInstance(); - $moduleDirName = basename(dirname(dirname(__DIR__))); + $moduleDirName = basename(dirname(dirname(__DIR__))); $moduleDirNameUpper = mb_strtoupper($moduleDirName); xoops_loadLanguage('common', $moduleDirName); $html = ''; @@ -50,7 +50,7 @@ public static function getServerStats() $html .= '