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

CommandResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAffectedRows() 0 4 1
A getLastId() 0 4 1
1
<?php
2
namespace Dazzle\PgSQL\Result;
3
4
class CommandResult implements CommandResultStatement
5
{
6
    use ResultAwareTrait;
7
8
    public function __construct($ret)
9
    {
10
        $this->ret = $ret;
11
    }
12
    
13
    public function getAffectedRows()
14
    {
15
        return \pg_affected_rows($this->ret);
16
    }
17
18
    public function getLastId()
19
    {
20
        return \pg_last_oid($this->ret);
21
    }
22
}