mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PHP/Core
* enforced v7.1 compliance, preparations for v7.2 * removed deprecated usage of each() * prefer array deconstruction via [] instead of calling list() * try to catch failed session_start() * prefer ... - Token instead of calling func_get_args() func_num_args() * enforce return types in AjaxHandler * revision push
This commit is contained in:
@@ -7,7 +7,7 @@ class AjaxArenaTeam extends AjaxHandler
|
||||
{
|
||||
protected $validParams = ['resync', 'status'];
|
||||
protected $_get = array(
|
||||
'id' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkIdList']],
|
||||
'id' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkIdList'] ],
|
||||
'profile' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkEmptySet']],
|
||||
);
|
||||
|
||||
@@ -35,7 +35,7 @@ class AjaxArenaTeam extends AjaxHandler
|
||||
profile: <empty> [optional, also get related chars]
|
||||
return: 1
|
||||
*/
|
||||
protected function handleResync()
|
||||
protected function handleResync() : string
|
||||
{
|
||||
if ($teams = DB::Aowow()->select('SELECT realm, realmGUID FROM ?_profiler_arena_team WHERE id IN (?a)', $this->_get['id']))
|
||||
foreach ($teams as $t)
|
||||
@@ -72,7 +72,7 @@ class AjaxArenaTeam extends AjaxHandler
|
||||
1: char does not exist
|
||||
2: armory gone
|
||||
*/
|
||||
protected function handleStatus()
|
||||
protected function handleStatus() : string
|
||||
{
|
||||
$response = Profiler::resyncStatus(TYPE_ARENA_TEAM, $this->_get['id']);
|
||||
return Util::toJSON($response);
|
||||
|
||||
Reference in New Issue
Block a user