Completed
Push — work-fleets ( 29b14b...6b7253 )
by SuperNova.WS
05:46
created

DbEmptyIterator::key()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
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 DbRowIterator {
9
10
  /**
11
   * Return the current element
12
   * @link http://php.net/manual/en/iterator.current.php
13
   * @return mixed Can return any type.
14
   * @since 5.0.0
15
   */
16
  public function current() {
17
    return null;
18
  }
19
20
  /**
21
   * Move forward to next element
22
   * @link http://php.net/manual/en/iterator.next.php
23
   * @return void Any returned value is ignored.
24
   * @since 5.0.0
25
   */
26
  public function next() {
27
    // Doing nothing
28
  }
29
30
  /**
31
   * Return the key of the current element
32
   * @link http://php.net/manual/en/iterator.key.php
33
   * @return mixed scalar on success, or null on failure.
34
   * @since 5.0.0
35
   */
36
  public function key() {
37
    return null;
38
  }
39
40
  /**
41
   * Checks if current position is valid
42
   * @link http://php.net/manual/en/iterator.valid.php
43
   * @return boolean The return value will be casted to boolean and then evaluated.
44
   * Returns true on success or false on failure.
45
   * @since 5.0.0
46
   */
47
  public function valid() {
48
    return false;
49
  }
50
51
  /**
52
   * Rewind the Iterator to the first element
53
   * @link http://php.net/manual/en/iterator.rewind.php
54
   * @return void Any returned value is ignored.
55
   * @since 5.0.0
56
   */
57
  public function rewind() {
58
    // Doing nothing
59
  }
60
}