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

CommandResult::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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
}