Completed
Push — ezp-31088-refactor-content-mod... ( ab3ba3 )
by
unknown
13:24 queued 33s
created

FallbackGateway::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Persistence\Legacy\SharedGateway\DatabasePlatform;
10
11
use Doctrine\DBAL\Connection;
12
use eZ\Publish\Core\Persistence\Legacy\SharedGateway\Gateway;
13
14
final class FallbackGateway implements Gateway
15
{
16
    /** @var \Doctrine\DBAL\Connection */
17
    private $connection;
18
19
    public function __construct(Connection $connection)
20
    {
21
        $this->connection = $connection;
22
    }
23
24
    public function getColumnNextIntegerValue(
25
        string $tableName,
26
        string $columnName,
27
        string $sequenceName
28
    ): ?int {
29
        return null;
30
    }
31
32
    public function getLastInsertedId(string $sequenceName): int
33
    {
34
        return (int)$this->connection->lastInsertId($sequenceName);
35
    }
36
}
37