Skip to content

Commit

Permalink
Replaced stdClass by object and die/exit() by exit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 8, 2022
1 parent ff78374 commit 0eaea84
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classes/issue/DAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 1 addition & 2 deletions classes/publication/DAO.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

use APP\core\Services;
use APP\facades\Repo;
use stdClass;

class DAO extends \PKP\publication\DAO
{
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/search/ArticleSearchIndex.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config.TEMPLATE.inc.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; <?php exit(); // DO NOT DELETE?>
; <?php exit; // DO NOT DELETE?>
; DO NOT DELETE THE ABOVE LINE!!!
; Doing so will expose this configuration file through your web site!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down
2 changes: 1 addition & 1 deletion plugins/paymethod/manual/ManualPaymentPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion tools/rebuildSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down

0 comments on commit 0eaea84

Please sign in to comment.