Completed
Push — master ( 91bc8f...12870b )
by Nikola
05:50
created

DoctrineDbalExecutor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 20
wmc 2
lcom 1
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 4 1
1
<?php
2
/*
3
 * This file is part of the QueryResourcesLoader Bundle, an RunOpenCode project.
4
 *
5
 * (c) 2016 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Bundle\QueryResourcesLoader\Executor;
11
12
use RunOpenCode\Bundle\QueryResourcesLoader\Contract\ExecutorInterface;
13
use Doctrine\DBAL\Connection;
14
15
class DoctrineDbalExecutor implements ExecutorInterface
16
{
17
    /**
18
     * @var Connection
19
     */
20
    private $connection;
21
22
    public function __construct(Connection $connection)
23
    {
24
        $this->connection = $connection;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function execute($query, array $parameters = array())
31
    {
32
        return $this->connection->executeQuery($query, $parameters);
33
    }
34
}
35