@@ -207,7 +207,7 @@ class WPDb extends Db
207
207
*
208
208
* @return void
209
209
*/
210
- public function __construct (ModuleContainer $ moduleContainer , ?array $ config = null , DbDump $ dbDump = null )
210
+ public function __construct (ModuleContainer $ moduleContainer , ?array $ config = null , ? DbDump $ dbDump = null )
211
211
{
212
212
parent ::__construct ($ moduleContainer , $ config );
213
213
$ this ->dbDump = $ dbDump ?? new DbDump ();
@@ -347,7 +347,7 @@ protected function validateConfig(): void
347
347
*
348
348
* @throws ModuleException It the database cannot be correctly initialized.
349
349
*/
350
- public function _initialize (Tables $ table = null ): void
350
+ public function _initialize (? Tables $ table = null ): void
351
351
{
352
352
/**
353
353
* Dispatches an event before the WPDb module initializes.
@@ -387,7 +387,7 @@ public function _initialize(Tables $table = null): void
387
387
*
388
388
* @throws ModuleConfigException|ModuleException If there's an issue during the cleanup phase.
389
389
*/
390
- public function importSqlDumpFile (string $ dumpFile = null ): void
390
+ public function importSqlDumpFile (? string $ dumpFile = null ): void
391
391
{
392
392
if ($ dumpFile !== null ) {
393
393
if (!is_file ($ dumpFile ) || !is_readable ($ dumpFile )) {
@@ -421,7 +421,7 @@ public function importSqlDumpFile(string $dumpFile = null): void
421
421
*
422
422
* @throws ModuleException|ModuleConfigException If there's a configuration or operation issue.
423
423
*/
424
- public function _cleanup (string $ databaseKey = null , array $ databaseConfig = null ): void
424
+ public function _cleanup (? string $ databaseKey = null , ? array $ databaseConfig = null ): void
425
425
{
426
426
parent ::_cleanup ($ databaseKey , $ databaseConfig );
427
427
$ this ->blogId = 0 ;
@@ -602,8 +602,8 @@ public function dontSeePostMetaInDatabase(array $criteria): void
602
602
public function seePostWithTermInDatabase (
603
603
int $ post_id ,
604
604
int $ term_taxonomy_id ,
605
- int $ term_order = null ,
606
- string $ taxonomy = null
605
+ ? int $ term_order = null ,
606
+ ? string $ taxonomy = null
607
607
): void {
608
608
if ($ taxonomy !== null ) {
609
609
$ match = $ this ->grabTermTaxonomyIdFromDatabase ([
@@ -3571,7 +3571,7 @@ public function dontSeeBlogInDatabase(array $criteria): void
3571
3571
* @param string|null $themeName The theme name, e.g. `Acme`, defaults to the "title" version of
3572
3572
* `$stylesheet`.
3573
3573
*/
3574
- public function useTheme (string $ stylesheet , string $ template = null , string $ themeName = null ): void
3574
+ public function useTheme (string $ stylesheet , ? string $ template = null , ? string $ themeName = null ): void
3575
3575
{
3576
3576
$ template = $ template ?: $ stylesheet ;
3577
3577
$ themeName = $ themeName ?: ucwords ($ stylesheet , ' _ ' );
@@ -3651,7 +3651,7 @@ public function haveMenuInDatabase(string $slug, string $location, array $overri
3651
3651
public function haveMenuItemInDatabase (
3652
3652
string $ menuSlug ,
3653
3653
string $ title ,
3654
- int $ menuOrder = null ,
3654
+ ? int $ menuOrder = null ,
3655
3655
array $ meta = []
3656
3656
): int {
3657
3657
if (empty ($ this ->stylesheet )) {
@@ -3748,7 +3748,7 @@ public function haveAttachmentInDatabase(
3748
3748
string $ file ,
3749
3749
string |int $ date = 'now ' ,
3750
3750
array $ overrides = [],
3751
- array $ imageSizes = null
3751
+ ? array $ imageSizes = null
3752
3752
): int {
3753
3753
if (!class_exists (ImageResize::class)) {
3754
3754
$ message = 'The "haveAttachmentInDatabase" method requires the "gumlet/php-image-resize:^1.6" package. ' .
@@ -3899,7 +3899,7 @@ public function haveAttachmentInDatabase(
3899
3899
*
3900
3900
* @return string The current site URL
3901
3901
*/
3902
- public function grabSiteUrl (string $ path = null ): string
3902
+ public function grabSiteUrl (? string $ path = null ): string
3903
3903
{
3904
3904
/** @var array{url: string} $config Validated module config. */
3905
3905
$ config = $ this ->config ;
@@ -4490,7 +4490,7 @@ protected function loadDumpUsingDriver(string $databaseKey): void
4490
4490
* @param string|null $databaseKey The key of the database to load.
4491
4491
* @param array<string,mixed>|null $databaseConfig The configuration for the database to load.
4492
4492
*/
4493
- public function _loadDump (string $ databaseKey = null , array $ databaseConfig = null ): void
4493
+ public function _loadDump (? string $ databaseKey = null , ? array $ databaseConfig = null ): void
4494
4494
{
4495
4495
parent ::_loadDump ($ databaseKey , $ databaseConfig );
4496
4496
$ this ->prepareDb ();
@@ -4525,8 +4525,8 @@ public function _loadDump(string $databaseKey = null, array $databaseConfig = nu
4525
4525
public function dontSeePostWithTermInDatabase (
4526
4526
int $ post_id ,
4527
4527
int $ term_taxonomy_id ,
4528
- int $ term_order = null ,
4529
- string $ taxonomy = null
4528
+ ? int $ term_order = null ,
4529
+ ? string $ taxonomy = null
4530
4530
): void {
4531
4531
if ($ taxonomy !== null ) {
4532
4532
$ match = $ this ->grabTermTaxonomyIdFromDatabase ([
0 commit comments