Completed
Push — work-fleets ( 6b7253...c0452c )
by SuperNova.WS
06:17
created

DbEmptyIterator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * Class DbEmptyIterator
5
 *
6
 * Empty iterator
7
 */
8
class DbEmptyIterator extends DbResultIterator {
9
10
  /**
11
   * Constructor
12
   *
13
   * @param mixed $result
14
   * @param int   $fetchMode constant (MYSQLI_ASSOC, MYSQLI_NUM, MYSQLI_BOTH)
15
   */
16
  public function __construct($result = false, $fetchMode = MYSQLI_ASSOC) {
17
    // Empty constructor
18
  }
19
20
  /**
21
   * Return the current element
22
   * @link http://php.net/manual/en/iterator.current.php
23
   * @return mixed Can return any type.
24
   * @since 5.0.0
25
   */
26
  public function current() {
27
    return null;
28
  }
29
30
  /**
31
   * Move forward to next element
32
   * @link http://php.net/manual/en/iterator.next.php
33
   * @return void Any returned value is ignored.
34
   * @since 5.0.0
35
   */
36
  public function next() {
37
    // Doing nothing
38
  }
39
40
  /**
41
   * Return the key of the current element
42
   * @link http://php.net/manual/en/iterator.key.php
43
   * @return mixed scalar on success, or null on failure.
44
   * @since 5.0.0
45
   */
46
  public function key() {
47
    return null;
48
  }
49
50
  /**
51
   * Checks if current position is valid
52
   * @link http://php.net/manual/en/iterator.valid.php
53
   * @return boolean The return value will be casted to boolean and then evaluated.
54
   * Returns true on success or false on failure.
55
   * @since 5.0.0
56
   */
57
  public function valid() {
58
    return false;
59
  }
60
61
  /**
62
   * Rewind the Iterator to the first element
63
   * @link http://php.net/manual/en/iterator.rewind.php
64
   * @return void Any returned value is ignored.
65
   * @since 5.0.0
66
   */
67
  public function rewind() {
68
    // Doing nothing
69
  }
70
71
  protected function fetchCurrentRow() {
72
    // TODO: Implement fetchCurrentRow() method.
73
    $this->currentRow = false;
0 ignored issues
show
Documentation Bug introduced by
It seems like false of type false is incompatible with the declared type array of property $currentRow.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
74
  }
75
}