Skip to content

Commit 657e919

Browse files
committed
Fix Return Type Covariance
1 parent d333306 commit 657e919

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 6
2+
level: 8
33
paths:
44
- MultisiteLanguageSwitcher.php
55
- includes

includes/MslsMain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final public function __construct( MslsOptions $options, MslsBlogCollection $col
3838
$this->collection = $collection;
3939
}
4040

41-
public static function create(): object {
41+
public static function create(): MslsMain {
4242
return new static( msls_options(), msls_blog_collection() );
4343
}
4444

includes/MslsOutput.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class MslsOutput extends MslsMain {
2323

2424
const MSLS_GET_TAGS_HOOK = 'msls_output_get_tags';
2525

26+
public static function create(): MslsOutput {
27+
return new static( msls_options(), msls_blog_collection() );
28+
}
2629

2730
public static function init(): object {
2831
_deprecated_function( __METHOD__, '2.9.2', 'MslsOutput::create' );

0 commit comments

Comments
 (0)