Skip to content
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

pkp/immersion#85 Replaced SectionDAO calls with repository method #86

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

touhidurabir
Copy link
Member

for #85

@@ -183,8 +183,7 @@ public function addIssueTemplateData($hookname, $args)
$immersionSectionColors = $issue->getData('immersionSectionColor');
if (empty($immersionSectionColors)) return false; // Section background colors aren't set

$sectionDao = DAORegistry::getDAO('SectionDAO'); /** @var SectionDAO $sectionDao */
$sections = $sectionDao->getByIssueId($issue->getId()); /** @var Section[] $sections */
$sections = Repo::section()->getByIssueId($issue->getId()); /** @var \Illuminate\Support\LazyCollection $sections */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to fix this. Return type is already specified for these new methods, thus phpdoc isn't required here or we can specify the type of individual items (as you already done below), although the latter is supported differently in IDEs

@Vitaliy-1 Vitaliy-1 merged commit 9544f89 into pkp:main Jun 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants