Skip to content

Commit 47c2371

Browse files
committedDec 31, 2022
[ticket/16955] Fix phpdoc annotations and return types
PHPBB3-16955
1 parent a3d0670 commit 47c2371

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+184
-171
lines changed
 

‎auth/provider/base.php

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function validate_session($user)
7979
*/
8080
public function login_link_has_necessary_data(array $login_link_data)
8181
{
82+
return null;
8283
}
8384

8485
/**

‎auth/provider/oauth/oauth.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ public function login_link_has_necessary_data(array $login_link_data)
424424
{
425425
return 'LOGIN_LINK_MISSING_DATA';
426426
}
427+
428+
return null;
427429
}
428430

429431
/**
@@ -475,8 +477,6 @@ public function logout($data, $new_session)
475477
// Clear all tokens belonging to the user
476478
$storage = new token_storage($this->db, $this->user, $this->oauth_token_table, $this->oauth_state_table);
477479
$storage->clearAllTokens();
478-
479-
return;
480480
}
481481

482482
/**
@@ -617,7 +617,7 @@ protected function link_account_login_link(array $link_data, $service_name)
617617
* @param array $link_data The same variable given to
618618
* {@see \phpbb\auth\provider\provider_interface::link_account}
619619
* @param string $service_name The name of the service being used in linking.
620-
* @return array|string|false Returns a language constant (string) if an error is encountered,
620+
* @return string|false|never Returns a language constant (string) if an error is encountered,
621621
* an array with error info or false on success.
622622
*/
623623
protected function link_account_auth_link(array $link_data, $service_name)
@@ -661,14 +661,17 @@ protected function link_account_auth_link(array $link_data, $service_name)
661661
}
662662
else
663663
{
664-
return $this->set_redirect($service);
664+
$this->set_redirect($service);
665+
666+
return false; // Not reached
665667
}
666668
}
667669

668670
/**
669671
* Performs the query that inserts an account link
670672
*
671673
* @param array $data This array is passed to db->sql_build_array
674+
* @return void
672675
*/
673676
protected function link_account_perform_link(array $data)
674677
{
@@ -852,6 +855,6 @@ protected function set_redirect($service)
852855

853856
redirect($service->getAuthorizationUri($parameters), false, true);
854857

855-
return [];
858+
return []; // Never reached
856859
}
857860
}

0 commit comments

Comments
 (0)
Please sign in to comment.