Skip to content

Commit

Permalink
Modernize callable syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Dec 10, 2024
1 parent ce05cf9 commit 1db4ce3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/v1/_submissions/BackendSubmissionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function getSubmissionCollector(array $queryParams): Collector

if (isset($queryParams['sectionIds'])) {
$collector->filterBySectionIds(
array_map('intval', paramToArray($queryParams['sectionIds']))
array_map(intval(...), paramToArray($queryParams['sectionIds']))
);
}

Expand Down
4 changes: 2 additions & 2 deletions classes/search/PreprintSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public function submissionMetadataChanged($submission)
array_values((array) $author->getData('givenName')),
array_values((array) $author->getData('familyName')),
array_values((array) $author->getData('preferredPublicName')),
array_values(array_map('strip_tags', (array) $author->getData('affiliation'))),
array_values(array_map('strip_tags', (array) $author->getData('biography')))
array_values(array_map(strip_tags(...), (array) $author->getData('affiliation'))),
array_values(array_map(strip_tags(...), (array) $author->getData('biography')))
);
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/metadata/dc11/filter/Dc11SchemaPreprintAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function &extractMetadataFromDataObject(&$submission)
// Contributor
$contributors = (array) $publication->getData('sponsor');
foreach ($contributors as $locale => $contributor) {
$contributors[$locale] = array_map('trim', explode(';', $contributor));
$contributors[$locale] = array_map(trim(...), explode(';', $contributor));
}
$this->_addLocalizedElements($dc11Description, 'dc:contributor', $contributors);

Expand Down

0 comments on commit 1db4ce3

Please sign in to comment.