1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[ticket/16955] Fix most return types in phpdoc

PHPBB3-16955
This commit is contained in:
Ruben Calvo
2023-01-01 22:01:52 +01:00
parent 3e8fced5c8
commit daa2dd280c
66 changed files with 135 additions and 124 deletions

View File

@@ -340,7 +340,7 @@ class context
* If key is false the position is set to 0
* If key is true the position is set to the last entry
*
* @return mixed false if not found, index position otherwise; be sure to test with ===
* @return false|int false if not found, index position otherwise; be sure to test with ===
*/
public function find_key_index($blockname, $key)
{
@@ -377,7 +377,7 @@ class context
// Change key to zero (change first position) if false and to last position if true
if (is_bool($key))
{
return (!$key) ? 0 : count($block) - 1;
return (!$key) ? 0 : (count($block) ?? 0) - 1;
}
// Get correct position if array given