@@ -89,12 +89,12 @@ public function __construct(
89
89
#[SensitiveParameter]
90
90
array | string $ username ,
91
91
#[SensitiveParameter]
92
- string $ password = null ,
93
- string $ schema = null ,
92
+ ? string $ password = null ,
93
+ ? string $ schema = null ,
94
94
string $ host = 'localhost ' ,
95
95
int $ port = 3306 ,
96
- Logger $ logger = null ,
97
- DatabaseCollector $ collector = null
96
+ ? Logger $ logger = null ,
97
+ ? DatabaseCollector $ collector = null
98
98
) {
99
99
if ($ collector ) {
100
100
$ this ->setDebugCollector ($ collector );
@@ -187,8 +187,8 @@ protected function connect(
187
187
#[SensitiveParameter]
188
188
array | string $ username ,
189
189
#[SensitiveParameter]
190
- string $ password = null ,
191
- string $ schema = null ,
190
+ ? string $ password = null ,
191
+ ? string $ schema = null ,
192
192
string $ host = 'localhost ' ,
193
193
int $ port = 3306
194
194
) : static {
@@ -415,7 +415,7 @@ public function use(string $schema) : static
415
415
*
416
416
* @return CreateSchema
417
417
*/
418
- public function createSchema (string $ schemaName = null ) : CreateSchema
418
+ public function createSchema (? string $ schemaName = null ) : CreateSchema
419
419
{
420
420
$ instance = new CreateSchema ($ this );
421
421
if ($ schemaName !== null ) {
@@ -431,7 +431,7 @@ public function createSchema(string $schemaName = null) : CreateSchema
431
431
*
432
432
* @return DropSchema
433
433
*/
434
- public function dropSchema (string $ schemaName = null ) : DropSchema
434
+ public function dropSchema (? string $ schemaName = null ) : DropSchema
435
435
{
436
436
$ instance = new DropSchema ($ this );
437
437
if ($ schemaName !== null ) {
@@ -447,7 +447,7 @@ public function dropSchema(string $schemaName = null) : DropSchema
447
447
*
448
448
* @return AlterSchema
449
449
*/
450
- public function alterSchema (string $ schemaName = null ) : AlterSchema
450
+ public function alterSchema (? string $ schemaName = null ) : AlterSchema
451
451
{
452
452
$ instance = new AlterSchema ($ this );
453
453
if ($ schemaName !== null ) {
@@ -463,7 +463,7 @@ public function alterSchema(string $schemaName = null) : AlterSchema
463
463
*
464
464
* @return CreateTable
465
465
*/
466
- public function createTable (string $ tableName = null ) : CreateTable
466
+ public function createTable (? string $ tableName = null ) : CreateTable
467
467
{
468
468
$ instance = new CreateTable ($ this );
469
469
if ($ tableName !== null ) {
@@ -480,7 +480,7 @@ public function createTable(string $tableName = null) : CreateTable
480
480
*
481
481
* @return DropTable
482
482
*/
483
- public function dropTable (string $ table = null , string ...$ tables ) : DropTable
483
+ public function dropTable (? string $ table = null , string ...$ tables ) : DropTable
484
484
{
485
485
$ instance = new DropTable ($ this );
486
486
if ($ table !== null ) {
@@ -496,7 +496,7 @@ public function dropTable(string $table = null, string ...$tables) : DropTable
496
496
*
497
497
* @return AlterTable
498
498
*/
499
- public function alterTable (string $ tableName = null ) : AlterTable
499
+ public function alterTable (? string $ tableName = null ) : AlterTable
500
500
{
501
501
$ instance = new AlterTable ($ this );
502
502
if ($ tableName !== null ) {
@@ -508,14 +508,14 @@ public function alterTable(string $tableName = null) : AlterTable
508
508
/**
509
509
* Call a DELETE statement.
510
510
*
511
- * @param array<string,Closure|string>|Closure |string|null $reference
512
- * @param array<string,Closure|string>|Closure |string ...$references
511
+ * @param Closure| array<string,Closure|string>|string|null $reference
512
+ * @param Closure| array<string,Closure|string>|string ...$references
513
513
*
514
514
* @return Delete
515
515
*/
516
516
public function delete (
517
- array | Closure | string $ reference = null ,
518
- array | Closure | string ...$ references
517
+ Closure | array | string | null $ reference = null ,
518
+ Closure | array | string ...$ references
519
519
) : Delete {
520
520
$ instance = new Delete ($ this );
521
521
if ($ reference !== null ) {
@@ -531,7 +531,7 @@ public function delete(
531
531
*
532
532
* @return Insert
533
533
*/
534
- public function insert (string $ intoTable = null ) : Insert
534
+ public function insert (? string $ intoTable = null ) : Insert
535
535
{
536
536
$ instance = new Insert ($ this );
537
537
if ($ intoTable !== null ) {
@@ -547,7 +547,7 @@ public function insert(string $intoTable = null) : Insert
547
547
*
548
548
* @return LoadData
549
549
*/
550
- public function loadData (string $ intoTable = null ) : LoadData
550
+ public function loadData (? string $ intoTable = null ) : LoadData
551
551
{
552
552
$ instance = new LoadData ($ this );
553
553
if ($ intoTable !== null ) {
@@ -563,7 +563,7 @@ public function loadData(string $intoTable = null) : LoadData
563
563
*
564
564
* @return Replace
565
565
*/
566
- public function replace (string $ intoTable = null ) : Replace
566
+ public function replace (? string $ intoTable = null ) : Replace
567
567
{
568
568
$ instance = new Replace ($ this );
569
569
if ($ intoTable !== null ) {
@@ -575,14 +575,14 @@ public function replace(string $intoTable = null) : Replace
575
575
/**
576
576
* Call a SELECT statement.
577
577
*
578
- * @param array<string,Closure|string>|Closure |string|null $reference
579
- * @param array<string,Closure|string>|Closure |string ...$references
578
+ * @param Closure| array<string,Closure|string>|string|null $reference
579
+ * @param Closure| array<string,Closure|string>|string ...$references
580
580
*
581
581
* @return Select
582
582
*/
583
583
public function select (
584
- array | Closure | string $ reference = null ,
585
- array | Closure | string ...$ references
584
+ Closure | array | string | null $ reference = null ,
585
+ Closure | array | string ...$ references
586
586
) : Select {
587
587
$ instance = new Select ($ this );
588
588
if ($ reference !== null ) {
@@ -594,14 +594,14 @@ public function select(
594
594
/**
595
595
* Call a UPDATE statement.
596
596
*
597
- * @param array<string,Closure|string>|Closure |string|null $reference
598
- * @param array<string,Closure|string>|Closure |string ...$references
597
+ * @param Closure| array<string,Closure|string>|string|null $reference
598
+ * @param Closure| array<string,Closure|string>|string ...$references
599
599
*
600
600
* @return Update
601
601
*/
602
602
public function update (
603
- array | Closure | string $ reference = null ,
604
- array | Closure | string ...$ references
603
+ Closure | array | string | null $ reference = null ,
604
+ Closure | array | string ...$ references
605
605
) : Update {
606
606
$ instance = new Update ($ this );
607
607
if ($ reference !== null ) {
@@ -773,7 +773,7 @@ public function protectIdentifier(string $identifier) : string
773
773
* the word "NULL". If is false, "FALSE". If is true, "TRUE". If is a string,
774
774
* returns the quoted string. The types int or float returns the same input value.
775
775
*/
776
- public function quote (float | bool | int | string | null $ value ) : float | int | string
776
+ public function quote (bool | float | int | string | null $ value ) : float | int | string
777
777
{
778
778
$ type = \gettype ($ value );
779
779
if ($ type === 'string ' ) {
@@ -818,7 +818,7 @@ protected function addToDebug(Closure $function) : mixed
818
818
819
819
protected function finalizeAddToDebug (
820
820
float $ start ,
821
- string | null $ description = null
821
+ ? string $ description = null
822
822
) : void {
823
823
$ end = \microtime (true );
824
824
$ rows = $ this ->mysqli ->affected_rows ;
0 commit comments