Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class FileConnectionConfig extends ConnectionConfig implements ProvidesSourceString |
||
17 | { |
||
18 | /** |
||
19 | * @param string $database The pathname to the SQLite database file. |
||
20 | * - In case of keyword ":memory:" {@see MemoryConnectionConfig}. |
||
21 | * - In case of empty string value {@see TempFileConnectionConfig}. |
||
22 | */ |
||
23 | public function __construct( |
||
24 | 26 | public string $database = '', |
|
25 | array $options = [], |
||
26 | ) { |
||
27 | parent::__construct($options); |
||
28 | 26 | } |
|
29 | 26 | ||
30 | /** |
||
31 | * Returns the SQLite-specific PDO DataSourceName, that looks like: |
||
32 | * <code> |
||
33 | * sqlite:/path/to/database.db |
||
34 | * </code> |
||
35 | * |
||
36 | * {@inheritDoc} |
||
37 | */ |
||
38 | public function getDsn(): string |
||
39 | 8 | { |
|
40 | return \sprintf('%s:%s', $this->getName(), $this->database); |
||
41 | 8 | } |
|
42 | |||
43 | public function getSourceString(): string |
||
46 | } |
||
47 | 2 | ||
48 | public function formatExceptionMessage(string $message): string |
||
53 |