File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434use mysqli ;
3535use mysqli_sql_exception ;
3636use 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
You can’t perform that action at this time.
0 commit comments