Skip to content

pkp/pkp-lib#11260 fix return type in getRepresentationDao() #11261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: stable-3_5_0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion classes/core/PKPApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Illuminate\Support\Facades\DB;
use PKP\config\Config;
use PKP\context\Context;
use PKP\db\DAO;
use PKP\db\DAORegistry;
use PKP\facades\Locale;
use PKP\plugins\Hook;
Expand All @@ -52,7 +53,7 @@ public static function getContextDAO(): \PKP\context\ContextDAO;
*
* @hook PKPApplication::execute::catch ['throwable' => $t]
*/
public static function getRepresentationDAO(): RepresentationDAOInterface;
public static function getRepresentationDAO(): DAO|RepresentationDAOInterface;

/**
* Get a SubmissionSearchIndex instance.
Expand Down Expand Up @@ -92,6 +93,8 @@ public static function getContextAssocType(): int;

/**
* Get the review workflow stages used by this application.
*
* @hook PKPApplication::execute::catch ['throwable' => $t]
*/
public function getReviewStages(): array;
}
Expand Down
4 changes: 2 additions & 2 deletions classes/submission/Representation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use APP\facades\Repo;

/**
* @extends \PKP\core\DataObject<DAO|RepresentationDAOInterface>
* @extends \PKP\core\DataObject
*/
class Representation extends \PKP\core\DataObject
{
Expand Down Expand Up @@ -172,7 +172,7 @@ public function getContextId()
/**
* @copydoc \PKP\core\DataObject::getDAO()
*/
public function getDAO(): \PKP\galley\DAO
public function getDAO(): \PKP\db\DAO|\PKP\core\EntityDAO
{
return Application::getRepresentationDAO();
}
Expand Down
3 changes: 2 additions & 1 deletion classes/submission/RepresentationDAOInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

/**
* @file classes/galley/DAO.php
* @file classes/submission/RepresentationDAOInterface.php
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
Expand Down