Passed
Pull Request — develop (#340)
by Felipe
04:56
created

ADORecordSet   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A count() 0 3 1
A recordCount() 0 3 1
A fetchField() 0 3 1
1
<?php
2
3
/**
4
 * PHPPgAdmin 6.0.0
5
 */
6
7
namespace PHPPgAdmin;
8
9
 
10
11
/**
12
 * Extends ADORecordSet to let correct inference on PHPDoc params.
13
 */
14
class ADORecordSet extends \ADORecordSet implements \Countable
15
{
16
    /**
17
     * Returns the recordCount.
18
     */
19
    public function count(): int
20
    {
21
        return $this->NumRows();
22
    }
23
24
    /**
25
     * synonyms RecordCount and RowCount.
26
     *
27
     * @return int number of rows or -1 if this is not supported
28
     */
29
    public function recordCount()
30
    {
31
        return $this->count();
32
    }
33
34
    /**
35
     * Returns the recordCount.
36
     *
37
     * @param int $fieldoffset
38
     *
39
     * @return \ADOFieldObject the field
40
     */
41
    public function fetchField($fieldoffset = -1): \ADOFieldObject
42
    {
43
        return parent::fetchField();
44
    }
45
}
46