From 0eaea84df2defe69b5d19de17aba9a7344fdec85 Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Tue, 4 Jan 2022 13:48:21 +0300 Subject: [PATCH] Replaced stdClass by object and die/exit() by exit --- classes/issue/DAO.inc.php | 2 +- classes/publication/DAO.inc.php | 3 +-- classes/search/ArticleSearchIndex.inc.php | 2 +- config.TEMPLATE.inc.php | 2 +- plugins/paymethod/manual/ManualPaymentPlugin.inc.php | 2 +- tools/rebuildSearchIndex.php | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/classes/issue/DAO.inc.php b/classes/issue/DAO.inc.php index f31a04f241b..c74b554f498 100644 --- a/classes/issue/DAO.inc.php +++ b/classes/issue/DAO.inc.php @@ -179,7 +179,7 @@ public function getIdByUrlPath(string $urlPath, int $contextId): ?int } /** @copydoc EntityDAO::fromRow() */ - public function fromRow(\stdClass $row): Issue + public function fromRow(object $row): Issue { return parent::fromRow($row); } diff --git a/classes/publication/DAO.inc.php b/classes/publication/DAO.inc.php index f42e3d7cc82..926ca880b62 100644 --- a/classes/publication/DAO.inc.php +++ b/classes/publication/DAO.inc.php @@ -15,7 +15,6 @@ use APP\core\Services; use APP\facades\Repo; -use stdClass; class DAO extends \PKP\publication\DAO { @@ -37,7 +36,7 @@ class DAO extends \PKP\publication\DAO /** * @copydoc SchemaDAO::_fromRow() */ - public function fromRow(stdClass $primaryRow): Publication + public function fromRow(object $primaryRow): Publication { $publication = parent::fromRow($primaryRow); $publication->setData('galleys', iterator_to_array( diff --git a/classes/search/ArticleSearchIndex.inc.php b/classes/search/ArticleSearchIndex.inc.php index f69aa2ea690..7c71685644a 100644 --- a/classes/search/ArticleSearchIndex.inc.php +++ b/classes/search/ArticleSearchIndex.inc.php @@ -295,7 +295,7 @@ public function rebuildIndex($log = false, $journal = null, $switches = []) // Check that no journal was given as we do // not support journal-specific re-indexing. if (is_a($journal, 'Journal')) { - die(__('search.cli.rebuildIndex.indexingByJournalNotSupported') . "\n"); + exit(__('search.cli.rebuildIndex.indexingByJournalNotSupported') . "\n"); } // Clear index diff --git a/config.TEMPLATE.inc.php b/config.TEMPLATE.inc.php index a8aa7ff81ff..df82e56866e 100644 --- a/config.TEMPLATE.inc.php +++ b/config.TEMPLATE.inc.php @@ -1,4 +1,4 @@ -; +; ; DO NOT DELETE THE ABOVE LINE!!! ; Doing so will expose this configuration file through your web site! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/plugins/paymethod/manual/ManualPaymentPlugin.inc.php b/plugins/paymethod/manual/ManualPaymentPlugin.inc.php index 9ee51362279..8eb90f63b66 100644 --- a/plugins/paymethod/manual/ManualPaymentPlugin.inc.php +++ b/plugins/paymethod/manual/ManualPaymentPlugin.inc.php @@ -187,7 +187,7 @@ public function handle($args, $request) 'backLinkLabel' => 'common.continue' ]); $templateMgr->display('frontend/pages/message.tpl'); - exit(); + exit; } parent::handle($args, $request); // Don't know what to do with it } diff --git a/tools/rebuildSearchIndex.php b/tools/rebuildSearchIndex.php index 3e6e9a64865..2ec96e6d5e2 100644 --- a/tools/rebuildSearchIndex.php +++ b/tools/rebuildSearchIndex.php @@ -49,7 +49,7 @@ public function execute() $journalDao = DAORegistry::getDAO('JournalDAO'); $journal = $journalDao->getByPath($journalPath); if (!$journal) { - die(__('search.cli.rebuildIndex.unknownJournal', ['journalPath' => $journalPath]) . "\n"); + exit(__('search.cli.rebuildIndex.unknownJournal', ['journalPath' => $journalPath]) . "\n"); } }