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

ADORecordSet::recordCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 0
dl 0
loc 3
rs 10
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