Completed
Push — work-fleets ( d7065d...1ee481 )
by SuperNova.WS
08:22
created

DBStaticFleetBashing   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 7
cp 0
rs 10
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A db_bashing_list_get() 0 5 1
A db_bashing_insert() 0 3 1
1
<?php
2
3
namespace DBStatic;
4
use classSupernova;
5
use mysqli_result;
6
7
class DBStaticFleetBashing {
8
9
  /**
10
   * @param $user
11
   * @param $planet_dst
12
   * @param $time_limit
13
   *
14
   * @return array|bool|mysqli_result|null
15
   */
16
  public static function db_bashing_list_get($user, $planet_dst, $time_limit) {
17
    $query = classSupernova::$db->doSelect("SELECT bashing_time FROM {{bashing}} WHERE bashing_user_id = {$user['id']} AND bashing_planet_id = {$planet_dst['id']} AND bashing_time >= {$time_limit};");
18
19
    return $query;
20
  }
21
22
23
  /**
24
   * @param $bashing_list
25
   */
26
  public static function db_bashing_insert($bashing_list) {
27
    classSupernova::$db->doInsertValuesDeprecated(TABLE_BASHING, array('bashing_user_id', 'bashing_planet_id', 'bashing_time'), $bashing_list);
0 ignored issues
show
Deprecated Code introduced by
The method db_mysql::doInsertValuesDeprecated() has been deprecated.

This method has been deprecated.

Loading history...
28
  }
29
30
}
31