Issues (1369)

classes/Que/DBStaticQue.php (3 issues)

Severity
1
<?php
2
3
namespace Que;
4
use SN;
5
6
class DBStaticQue {
7
8
  public static function db_que_list_by_type_location($user_id, $planet_id = null, $que_type = false, $for_update = false) {
9
    return SN::db_que_list_by_type_location($user_id, $planet_id, $que_type, $for_update);
10
  }
11
12
  public static function db_que_list_stat() {
13
    return doquery("SELECT que_player_id, sum(que_unit_amount) AS que_unit_amount, que_unit_price FROM `{{que}}` GROUP BY que_player_id, que_unit_price;");
0 ignored issues
show
Deprecated Code introduced by
The function doquery() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

13
    return /** @scrutinizer ignore-deprecated */ doquery("SELECT que_player_id, sum(que_unit_amount) AS que_unit_amount, que_unit_price FROM `{{que}}` GROUP BY que_player_id, que_unit_price;");
Loading history...
14
  }
15
16
  public static function db_que_set_time_left_by_id($que_id, $que_time_left) {
17
    return SN::db_upd_record_by_id(LOC_QUE, $que_id, "`que_time_left` = {$que_time_left}");
18
  }
19
20
  public static function db_que_set_insert($set) {
21
    return SN::db_ins_record(LOC_QUE, $set);
22
  }
23
24
  public static function db_que_delete_by_id($que_id) {
25
    return SN::db_del_record_by_id(LOC_QUE, $que_id);
26
  }
27
28
  public static function db_que_planet_change_owner($planet_id, $new_owner_id) {
29
    return doquery("UPDATE {{que}} SET `que_player_id` = {$new_owner_id} WHERE `que_planet_id` = {$planet_id}");
0 ignored issues
show
Deprecated Code introduced by
The function doquery() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

29
    return /** @scrutinizer ignore-deprecated */ doquery("UPDATE {{que}} SET `que_player_id` = {$new_owner_id} WHERE `que_planet_id` = {$planet_id}");
Loading history...
30
  }
31
32
  public static function db_que_research_change_origin($planet_id, $new_planet_id) {
33
    return doquery("UPDATE {{que}} SET `que_planet_id_origin` = {$new_planet_id} WHERE `que_planet_id_origin` = {$planet_id}");
0 ignored issues
show
Deprecated Code introduced by
The function doquery() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

33
    return /** @scrutinizer ignore-deprecated */ doquery("UPDATE {{que}} SET `que_planet_id_origin` = {$new_planet_id} WHERE `que_planet_id_origin` = {$planet_id}");
Loading history...
34
  }
35
36
}