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

DoctrineDbalExecutor::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
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