Skip to content

Commit

Permalink
pkp#10823 Typed remaining methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jan 20, 2025
1 parent 73e3623 commit 0cf9a95
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions classes/core/PKPRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,9 @@ public function getRequestedContextPath(PKPRequest $request): string
/**
* A Generic call to a context defining object (e.g. a Journal, Press, or Server)
*
* @param $forceReload (optional) Reset a context even if it's already been loaded
*
* @return Context
* @param bool $forceReload (optional) Reset a context even if it's already been loaded
*/
public function getContext(PKPRequest $request, $forceReload = false)
public function getContext(PKPRequest $request, bool $forceReload = false): ?Context
{
if ($forceReload || !isset($this->_context)) {
// Retrieve the requested context path (this validates the path)
Expand Down Expand Up @@ -296,10 +294,10 @@ abstract public function handleAuthorizationFailure(
* 3) initialization
* 4) execution
* 5) client response
*
* @param $validate whether or not to execute the validation step.
* @param array{0:PKPHandler,1:string} $serviceEndpoint
* @param bool $validate whether or not to execute the validation step.
*/
public function _authorizeInitializeAndCallRequest(callable $serviceEndpoint, PKPRequest $request, array $args, bool $validate = true): void
public function _authorizeInitializeAndCallRequest(callable|array $serviceEndpoint, PKPRequest $request, array $args, bool $validate = true): void
{
$dispatcher = $this->getDispatcher();

Expand Down

0 comments on commit 0cf9a95

Please sign in to comment.