diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2021-02-07 14:10:36 +0100 |
---|---|---|
committer | Krinkle <krinklemail@gmail.com> | 2021-02-09 02:55:57 +0000 |
commit | a1de8b8700f4aa9e27bb571fac1705ff8dac161a (patch) | |
tree | 504ec50953e1bc7fbd92fb2959564ddce02062a0 /tests/phpunit/mocks/MockTitleTrait.php | |
parent | 20f44cb1ea0fc957c83e01e438b4c4fc04053fb7 (diff) | |
download | mediawikicore-a1de8b8700f4aa9e27bb571fac1705ff8dac161a.tar.gz mediawikicore-a1de8b8700f4aa9e27bb571fac1705ff8dac161a.zip |
Tests: Mark more more closures as static
Result of a new sniff I25a17fb22b6b669e817317a0f45051ae9c608208
Bug: T274036
Change-Id: I695873737167a75f0d94901fa40383a33984ca55
Diffstat (limited to 'tests/phpunit/mocks/MockTitleTrait.php')
-rw-r--r-- | tests/phpunit/mocks/MockTitleTrait.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/mocks/MockTitleTrait.php b/tests/phpunit/mocks/MockTitleTrait.php index 43994ae82e55..f886a0b48a98 100644 --- a/tests/phpunit/mocks/MockTitleTrait.php +++ b/tests/phpunit/mocks/MockTitleTrait.php @@ -46,10 +46,10 @@ trait MockTitleTrait { $title->method( 'getTouched' )->willReturn( $id ? '20200101223344' : false ); $title->method( 'getPageLanguage' )->willReturn( $props['language'] ?? 'qqx' ); $title->method( 'getRestrictions' )->willReturn( [] ); - $title->method( 'isSamePageAs' )->willReturnCallback( function ( $other ) use ( $id ) { + $title->method( 'isSamePageAs' )->willReturnCallback( static function ( $other ) use ( $id ) { return $other && $id === $other->getArticleId(); } ); - $title->method( 'isSameLinkAs' )->willReturnCallback( function ( $other ) use ( $ns, $text ) { + $title->method( 'isSameLinkAs' )->willReturnCallback( static function ( $other ) use ( $ns, $text ) { return $other && $text === $other->getDBkey() && $ns === $other->getNamespace(); } ); |