db_helper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fetch() 0 1 1
A __construct() 0 1 1
1
<?php
2
3
/**
4
* @Auther: bhief
5
* @Version: 1.0
6
* @Added Base
7
*
8
* Use this for every database interaction
9
* This class has basic DB interaction functions & can insert & update
10
*
11
**/
12
class db_helper {
13
	public function __construct(){
14
      
15
	}
16
17
  function fetch(string $table, array $where, string $extra) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
Unused Code introduced by
The parameter $extra is not used and could be removed. ( Ignorable by Annotation )

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

17
  function fetch(string $table, array $where, /** @scrutinizer ignore-unused */ string $extra) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $where is not used and could be removed. ( Ignorable by Annotation )

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

17
  function fetch(string $table, /** @scrutinizer ignore-unused */ array $where, string $extra) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $table is not used and could be removed. ( Ignorable by Annotation )

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

17
  function fetch(/** @scrutinizer ignore-unused */ string $table, array $where, string $extra) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
19
  }
20
}
21
22
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...