db_affected_rows()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
function db_escape_string($s, $strip_tags = true) {
4
    return Db::get()->escape_string($s, $strip_tags);
5
}
6
7
function db_query($query, $die_on_error = true) {
8
    return Db::get()->query($query, $die_on_error);
9
}
10
11
function db_fetch_assoc($result) {
12
    return Db::get()->fetch_assoc($result);
13
}
14
15
16
function db_num_rows($result) {
17
    return Db::get()->num_rows($result);
18
}
19
20
function db_fetch_result($result, $row, $param) {
21
    return Db::get()->fetch_result($result, $row, $param);
22
}
23
24
function db_affected_rows($result) {
25
    return Db::get()->affected_rows($result);
26
}
27
28
function db_last_error() {
29
    return Db::get()->last_error();
30
}
31
32
function db_last_query_error() {
33
    return Db::get()->last_query_error();
34
}
35
36
function db_quote($str) {
37
    return Db::get()->quote($str);
0 ignored issues
show
Bug introduced by
The method quote() does not exist on IDb. ( Ignorable by Annotation )

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

37
    return Db::get()->/** @scrutinizer ignore-call */ quote($str);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
38
}
39