| Total Complexity | 4 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 5 | abstract class AbstractConnectionConfig implements ConnectionConfigInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | protected $host; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $username; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $password; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $dbname; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $adapter; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | protected $port; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $host |
||
| 39 | * @param string $username |
||
| 40 | * @param string $password |
||
| 41 | * @param string $dbname |
||
| 42 | * @param string $adapter |
||
| 43 | * @param int $port |
||
| 44 | */ |
||
| 45 | public function __construct( |
||
| 46 | string $host, |
||
| 47 | string $username, |
||
| 48 | string $password, |
||
| 49 | string $dbname, |
||
| 50 | string $adapter, |
||
| 51 | int $port = 3306 |
||
| 52 | ) { |
||
| 53 | $this->host = $host; |
||
| 54 | $this->username = $username; |
||
| 55 | $this->password = $password; |
||
| 56 | $this->dbname = $dbname; |
||
| 57 | $this->adapter = $adapter; |
||
| 58 | $this->port = $port; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getUsername(): string |
||
| 65 | { |
||
| 66 | return $this->username; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getPassword(): string |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string |
||
| 79 | */ |
||
| 80 | public function getDbname(): string |
||
| 83 | } |
||
| 84 | } |
||
| 85 |