MySQLPDO::getDSN()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Class MySQLPDO
4
 *
5
 * @filesource   MySQLPDO.php
6
 * @created      28.06.2017
7
 * @package      chillerlan\Database\Drivers
8
 * @author       Smiley <[email protected]>
9
 * @copyright    2017 Smiley
10
 * @license      MIT
11
 *
12
 * @noinspection PhpComposerExtensionStubsInspection
13
 */
14
15
namespace chillerlan\Database\Drivers;
16
17
use chillerlan\Database\Dialects\MySQL;
18
19
/**
20
 * @property \PDO $db
21
 */
22
class MySQLPDO extends PDODriverAbstract{
23
24
	protected string $drivername = 'mysql';
25
	protected string $dialect    = MySQL::class;
26
27
	/** @inheritdoc */
28
	protected function getDSN():string {
29
		// the charset option is specific to mysql
30
		return parent::getDSN().';charset='.$this->options->mysql_charset;
31
	}
32
33
}
34