Completed
Push — master ( 7aa5ea...c891e1 )
by Beniamin
08:55
created

PDOStatement   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 33
c 1
b 0
f 0
wmc 3
lcom 1
cbo 0
ccs 0
cts 8
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 6 1
A rowCount() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of UnderQuery package.
5
 *
6
 * Copyright (c) 2016 Beniamin Jonatan Šimko
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Phuria\UnderQuery\Statement;
13
14
/**
15
 * @author Beniamin Jonatan Šimko <[email protected]>
16
 */
17
class PDOStatement implements StatementInterface
18
{
19
    /**
20
     * @var \PDOStatement
21
     */
22
    private $wrappedStatement;
23
24
    /**
25
     * @param \PDOStatement $stmt
26
     */
27
    public function __construct(\PDOStatement $stmt)
28
    {
29
        $this->wrappedStatement = $stmt;
30
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public function execute()
36
    {
37
        $this->wrappedStatement->execute();
38
39
        return $this;
40
    }
41
42
    /**
43
     * @inheritdoc
44
     */
45
    public function rowCount()
46
    {
47
        return $this->wrappedStatement->rowCount();
48
    }
49
}