Completed
Pull Request — master (#1)
by
unknown
08:32
created

Tuple   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 1
dl 0
loc 40
ccs 0
cts 28
cp 0
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fetchColumn() 0 4 1
A fetchRow() 0 4 1
A fetchAll() 0 4 1
A fetchAssoc() 0 4 1
A fetchObject() 0 4 1
A getStatus() 0 4 1
1
<?php
2
namespace Dazzle\PgSQL\Result;
3
4
class Tuple implements TupleResultStatement
5
{
6
7
    use ResultAwareTrait;
8
9
    public function __construct($ret)
10
    {
11
        $this->ret = $ret;
12
    }
13
14
    public function fetchColumn($filed = '')
15
    {
16
        return \pg_fetch_result($this->ret, 0, $filed);
17
    }
18
19
    public function fetchRow($filed = '')
20
    {
21
        return \pg_fetch_row($this->ret, 0);
22
    }
23
24
    public function fetchAll()
25
    {
26
        return \pg_fetch_all($this->ret);
27
    }
28
29
    public function fetchAssoc()
30
    {
31
        return \pg_fetch_assoc($this->ret);
32
    }
33
34
    public function fetchObject()
35
    {
36
        return \pg_fetch_object($this->ret);
37
    }
38
39
    public function getStatus()
40
    {
41
        return \pg_result_status($this->ret);
42
    }
43
}