Passed
Pull Request — master (#380)
by Wilmer
03:09
created

Command   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A internalExecute() 0 3 1
A insertEx() 0 3 1
A queryBuilder() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\Support\Stubs;
6
7
use Yiisoft\Db\Cache\QueryCache;
8
use Yiisoft\Db\Driver\PDO\CommandPDO;
9
use Yiisoft\Db\Driver\PDO\CommandPDOInterface;
10
use Yiisoft\Db\Driver\PDO\ConnectionPDOInterface;
11
use Yiisoft\Db\Exception\NotSupportedException;
12
use Yiisoft\Db\QueryBuilder\QueryBuilderInterface;
13
14
final class Command extends CommandPDO implements CommandPDOInterface
15
{
16
    public function __construct(ConnectionPDOInterface $db, QueryCache $queryCache)
17
    {
18
        parent::__construct($db, $queryCache);
19
    }
20
21
    public function insertEx(string $table, array $columns): bool|array
22
    {
23
        return [];
24
    }
25
26
    public function queryBuilder(): QueryBuilderInterface
27
    {
28
        return $this->db->getQueryBuilder();
29
    }
30
31
    protected function internalExecute(string|null $rawSql): void
32
    {
33
        throw new NotSupportedException(self::class . ' does not support internalExecute() by core-db.');
34
    }
35
}
36