Skip to content

Commit a1468a7

Browse files
committed
Add SensitiveParameter attributes
1 parent 4ebef16 commit a1468a7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Database.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
use mysqli;
3535
use mysqli_sql_exception;
3636
use RuntimeException;
37+
use SensitiveParameter;
3738

3839
/**
3940
* Class Database.
@@ -84,8 +85,8 @@ class Database
8485
* @throws mysqli_sql_exception if connections fail
8586
*/
8687
public function __construct(
87-
array | string $username,
88-
string $password = null,
88+
#[SensitiveParameter] array | string $username,
89+
#[SensitiveParameter] string $password = null,
8990
string $schema = null,
9091
string $host = 'localhost',
9192
int $port = 3306,
@@ -174,8 +175,8 @@ protected function makeConfig(array $config) : array
174175
* @return static
175176
*/
176177
protected function connect(
177-
array | string $username,
178-
string $password = null,
178+
#[SensitiveParameter] array | string $username,
179+
#[SensitiveParameter] string $password = null,
179180
string $schema = null,
180181
string $host = 'localhost',
181182
int $port = 3306

0 commit comments

Comments
 (0)