Skip to content

Commit 87e59c9

Browse files
authored
Merge pull request #11261 from bozana/11260-3_5_0
#11260 fix return type in getRepresentationDao()
2 parents 5160ab6 + 322ff4a commit 87e59c9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

classes/core/PKPApplication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Illuminate\Support\Facades\DB;
3131
use PKP\config\Config;
3232
use PKP\context\Context;
33+
use PKP\db\DAO;
3334
use PKP\db\DAORegistry;
3435
use PKP\facades\Locale;
3536
use PKP\plugins\Hook;
@@ -52,7 +53,7 @@ public static function getContextDAO(): \PKP\context\ContextDAO;
5253
*
5354
* @hook PKPApplication::execute::catch ['throwable' => $t]
5455
*/
55-
public static function getRepresentationDAO(): RepresentationDAOInterface;
56+
public static function getRepresentationDAO(): DAO|RepresentationDAOInterface;
5657

5758
/**
5859
* Get a SubmissionSearchIndex instance.

classes/submission/Representation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use APP\facades\Repo;
2121

2222
/**
23-
* @extends \PKP\core\DataObject<DAO|RepresentationDAOInterface>
23+
* @extends \PKP\core\DataObject
2424
*/
2525
class Representation extends \PKP\core\DataObject
2626
{
@@ -172,7 +172,7 @@ public function getContextId()
172172
/**
173173
* @copydoc \PKP\core\DataObject::getDAO()
174174
*/
175-
public function getDAO(): \PKP\galley\DAO
175+
public function getDAO(): \PKP\db\DAO|\PKP\core\EntityDAO
176176
{
177177
return Application::getRepresentationDAO();
178178
}

classes/submission/RepresentationDAOInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
2+
23
/**
3-
* @file classes/galley/DAO.php
4+
* @file classes/submission/RepresentationDAOInterface.php
45
*
56
* Copyright (c) 2014-2021 Simon Fraser University
67
* Copyright (c) 2000-2021 John Willinsky

0 commit comments

Comments
 (0)