@@ -216,7 +216,7 @@ class WPDb extends Db
216
216
*
217
217
* @return void
218
218
*/
219
- public function __construct (ModuleContainer $ moduleContainer , ?array $ config = null , DbDump $ dbDump = null )
219
+ public function __construct (ModuleContainer $ moduleContainer , ?array $ config = null , ? DbDump $ dbDump = null )
220
220
{
221
221
parent ::__construct ($ moduleContainer , $ config );
222
222
$ this ->dbDump = $ dbDump ?? new DbDump ();
@@ -356,7 +356,7 @@ protected function validateConfig(): void
356
356
*
357
357
* @throws ModuleException It the database cannot be correctly initialized.
358
358
*/
359
- public function _initialize (Tables $ table = null ): void
359
+ public function _initialize (? Tables $ table = null ): void
360
360
{
361
361
/**
362
362
* Dispatches an event before the WPDb module initializes.
@@ -396,7 +396,7 @@ public function _initialize(Tables $table = null): void
396
396
*
397
397
* @throws ModuleConfigException|ModuleException If there's an issue during the cleanup phase.
398
398
*/
399
- public function importSqlDumpFile (string $ dumpFile = null ): void
399
+ public function importSqlDumpFile (? string $ dumpFile = null ): void
400
400
{
401
401
if ($ dumpFile !== null ) {
402
402
if (!is_file ($ dumpFile ) || !is_readable ($ dumpFile )) {
@@ -611,8 +611,8 @@ public function dontSeePostMetaInDatabase(array $criteria): void
611
611
public function seePostWithTermInDatabase (
612
612
int $ post_id ,
613
613
int $ term_taxonomy_id ,
614
- int $ term_order = null ,
615
- string $ taxonomy = null
614
+ ? int $ term_order = null ,
615
+ ? string $ taxonomy = null
616
616
): void {
617
617
if ($ taxonomy !== null ) {
618
618
$ match = $ this ->grabTermTaxonomyIdFromDatabase ([
@@ -3574,7 +3574,7 @@ public function dontSeeBlogInDatabase(array $criteria): void
3574
3574
* @param string|null $themeName The theme name, e.g. `Acme`, defaults to the "title" version of
3575
3575
* `$stylesheet`.
3576
3576
*/
3577
- public function useTheme (string $ stylesheet , string $ template = null , string $ themeName = null ): void
3577
+ public function useTheme (string $ stylesheet , ? string $ template = null , ? string $ themeName = null ): void
3578
3578
{
3579
3579
$ template = $ template ?: $ stylesheet ;
3580
3580
$ themeName = $ themeName ?: ucwords ($ stylesheet , ' _ ' );
@@ -3654,7 +3654,7 @@ public function haveMenuInDatabase(string $slug, string $location, array $overri
3654
3654
public function haveMenuItemInDatabase (
3655
3655
string $ menuSlug ,
3656
3656
string $ title ,
3657
- int $ menuOrder = null ,
3657
+ ? int $ menuOrder = null ,
3658
3658
array $ meta = []
3659
3659
): int {
3660
3660
if (empty ($ this ->stylesheet )) {
@@ -3751,7 +3751,7 @@ public function haveAttachmentInDatabase(
3751
3751
string $ file ,
3752
3752
$ date = 'now ' ,
3753
3753
array $ overrides = [],
3754
- array $ imageSizes = null
3754
+ ? array $ imageSizes = null
3755
3755
): int {
3756
3756
if (!class_exists (ImageResize::class)) {
3757
3757
$ message = 'The "haveAttachmentInDatabase" method requires the "gumlet/php-image-resize:^1.6" package. ' .
@@ -3902,7 +3902,7 @@ public function haveAttachmentInDatabase(
3902
3902
*
3903
3903
* @return string The current site URL
3904
3904
*/
3905
- public function grabSiteUrl (string $ path = null ): string
3905
+ public function grabSiteUrl (? string $ path = null ): string
3906
3906
{
3907
3907
/** @var array{url: string} $config Validated module config. */
3908
3908
$ config = $ this ->config ;
@@ -4528,8 +4528,8 @@ public function _loadDump($databaseKey = null, $databaseConfig = null)
4528
4528
public function dontSeePostWithTermInDatabase (
4529
4529
int $ post_id ,
4530
4530
int $ term_taxonomy_id ,
4531
- int $ term_order = null ,
4532
- string $ taxonomy = null
4531
+ ? int $ term_order = null ,
4532
+ ? string $ taxonomy = null
4533
4533
): void {
4534
4534
if ($ taxonomy !== null ) {
4535
4535
$ match = $ this ->grabTermTaxonomyIdFromDatabase ([
0 commit comments