Passed
Pull Request — master (#3759)
by Benjamin
65:19
created

Connection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSequenceNumber() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Driver\PDOSqlite;
6
7
use Doctrine\DBAL\Driver\PDOConnection;
8
use Doctrine\DBAL\Driver\PDOException;
9
10
/**
11
 * SQLite Connection implementation.
12
 */
13
class Connection extends PDOConnection
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getSequenceNumber(string $name) : string
19
    {
20
        // SQLite does not support sequences. However, PDO::lastInsertId() ignores the name parameter, and returns
21
        // the last insert ID even if a sequence name is given. We expect an exception in that case.
22
        throw new PDOException('SQLite does not support sequences.');
23
    }
24
}
25