Skip to content

Commit cde0c74

Browse files
committed
Issues that came up during review fixed
1 parent 26d4605 commit cde0c74

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

includes/MslsJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function compare( array $a, array $b ): int {
5252
public function get(): array {
5353
$arr = $this->arr;
5454

55-
usort( $arr, \Closure::fromCallable( array( __CLASS__, 'compare' ) ) );
55+
usort( $arr, array( __CLASS__, 'compare' ) );
5656

5757
return $arr;
5858
}

includes/MslsOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static function create( $id = 0 ) {
106106
$options = new MslsOptionsPost( get_queried_object_id() );
107107
}
108108

109-
add_filter( self::MSLS_GET_POSTLINK_HOOK, \Closure::fromCallable( array( self::class, 'check_for_blog_slug' ) ), 10, 2 );
109+
add_filter( self::MSLS_GET_POSTLINK_HOOK, array( self::class, 'check_for_blog_slug' ), 10, 2 );
110110

111111
return $options;
112112
}

includes/MslsShortCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class MslsShortCode {
66

77
public static function init(): void {
8-
add_shortcode( 'sc_msls_widget', \Closure::fromCallable( array( __CLASS__, 'render_widget' ) ) );
8+
add_shortcode( 'sc_msls_widget', array( __CLASS__, 'render_widget' ) );
99
add_shortcode( 'sc_msls', 'msls_get_switcher' );
1010
}
1111

tests/phpunit/TestMslsShortCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final class TestMslsShortCode extends MslsUnitTestCase {
1010

1111
public function test_init(): void {
12-
Functions\expect( 'add_shortcode' )->once()->with( 'sc_msls_widget', \Mockery::type( \Closure::class ) );
12+
Functions\expect( 'add_shortcode' )->once()->with( 'sc_msls_widget', array( MslsShortCode::class, 'render_widget' ) );
1313
Functions\expect( 'add_shortcode' )->once()->with( 'sc_msls', 'msls_get_switcher' );
1414

1515
$this->expectNotToPerformAssertions();

0 commit comments

Comments
 (0)