diff --git a/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php b/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php index 751f048bedc..c9b685cf29d 100644 --- a/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php +++ b/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php @@ -234,7 +234,7 @@ protected function buildOrphanedEntityProcessor(): void $affectedRows = 0; $rows = DB::table('publications AS p') ->join('publication_settings AS ps', 'ps.publication_id', '=', 'p.publication_id') - ->leftJoin('issues AS i', DB::raw('CAST(i.issue_id AS CHAR(20))'), '=', 'ps.setting_value') + ->leftJoin('issues AS i', 'ps.setting_value', '=', DB::raw('CAST(i.issue_id AS CHAR(20))')) ->where('ps.setting_name', 'issueId') ->whereNull('i.issue_id') ->get(['p.submission_id', 'p.publication_id', 'ps.setting_value']); diff --git a/classes/observers/events/UsageEvent.php b/classes/observers/events/UsageEvent.php index 29199c8583d..4a3b5f39fce 100644 --- a/classes/observers/events/UsageEvent.php +++ b/classes/observers/events/UsageEvent.php @@ -34,11 +34,11 @@ class UsageEvent extends \PKP\observers\events\UsageEvent public function __construct( int $assocType, Context $context, - Submission $submission = null, - Representation $galley = null, - SubmissionFile $submissionFile = null, - Issue $issue = null, - IssueGalley $issueGalley = null + ?Submission $submission = null, + ?Representation $galley = null, + ?SubmissionFile $submissionFile = null, + ?Issue $issue = null, + ?IssueGalley $issueGalley = null ) { $this->issue = $issue; $this->issueGalley = $issueGalley; diff --git a/classes/section/Section.php b/classes/section/Section.php index d852ccaada3..5db69fe3487 100644 --- a/classes/section/Section.php +++ b/classes/section/Section.php @@ -36,7 +36,7 @@ public function getAbbrev(?string $locale): string|array|null return $this->getData('abbrev', $locale); } - public function setAbbrev(string|array $abbrev, string $locale = null): void + public function setAbbrev(string|array $abbrev, ?string $locale = null): void { $this->setData('abbrev', $abbrev, $locale); } @@ -51,7 +51,7 @@ public function getPolicy(?string $locale): string|array|null return $this->getData('policy', $locale); } - public function setPolicy(string|array $policy, string $locale = null): void + public function setPolicy(string|array $policy, ?string $locale = null): void { $this->setData('policy', $policy, $locale); } @@ -186,7 +186,7 @@ public function getIdentifyType(?string $locale): string|array|null /** * Set string identifying type of items in this section. */ - public function setIdentifyType(string|array $identifyType, string $locale = null): void + public function setIdentifyType(string|array $identifyType, ?string $locale = null): void { $this->setData('identifyType', $identifyType, $locale); } diff --git a/pages/issue/IssueHandler.php b/pages/issue/IssueHandler.php index 5192ee7bd06..98fc5ac767c 100644 --- a/pages/issue/IssueHandler.php +++ b/pages/issue/IssueHandler.php @@ -326,7 +326,7 @@ public function userCanViewGalley($request) * will be displayed. * @param bool $withSubscriptionDetails Should include the subscription related information into the template */ - public static function _setupIssueTemplate(Request $request, Issue $issue, Journal $journal = null, $showToc = false, $withSubscriptionDetails = true) + public static function _setupIssueTemplate(Request $request, Issue $issue, ?Journal $journal = null, $showToc = false, $withSubscriptionDetails = true) { $journal ??= $request->getJournal(); $templateMgr = TemplateManager::getManager($request); diff --git a/tools/resolveAgencyDuplicates.php b/tools/resolveAgencyDuplicates.php index 59d6f1473c7..f236356723a 100644 --- a/tools/resolveAgencyDuplicates.php +++ b/tools/resolveAgencyDuplicates.php @@ -8,8 +8,8 @@ class resolveAgencyDuplicates extends \PKP\cliTool\CommandLineTool { - private string|null $command = null; - private string|null $agency_name = null; + private ?string $command = null; + private ?string $agency_name = null; private bool $forceFlag = false; /** * List of potential agencies to choose from along with related fields for resolution.