From 834ce601e5fd462d44d095df4f62df52ccf14b61 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 8 Dec 2024 21:55:30 +0100 Subject: [PATCH] Change function name to start with lowercase Add ignore for the remaining phpcs issue Enable the excluded sniff and suppress the issue inline Avoid that new code gets added with this issue. Change-Id: Ifae1c0979e224c33d1c59ebf2330bb27da0da2e5 --- .phpcs.xml | 1 - includes/Hooks.php | 2 ++ tests/phpunit/Controller/NotificationControllerTest.php | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index b77393d3c..6f1d670a9 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -5,7 +5,6 @@ - includes/ diff --git a/includes/Hooks.php b/includes/Hooks.php index 900e073ea..ae2d7e359 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -84,6 +84,8 @@ use SkinTemplate; use Wikimedia\Stats\StatsFactory; use WikiPage; +// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName + class Hooks implements AbortTalkPageEmailNotificationHook, ApiMain__moduleManagerHook, diff --git a/tests/phpunit/Controller/NotificationControllerTest.php b/tests/phpunit/Controller/NotificationControllerTest.php index 55fa73a90..c8a3fb601 100644 --- a/tests/phpunit/Controller/NotificationControllerTest.php +++ b/tests/phpunit/Controller/NotificationControllerTest.php @@ -356,7 +356,7 @@ class NotificationControllerTest extends MediaWikiIntegrationTestCase { } /** - * @dataProvider PageLinkedTitleMutedByUserDataProvider + * @dataProvider pageLinkedTitleMutedByUserDataProvider * @param int $mockArticleID * @param int[] $mockMutedTitlePreferences * @param bool $expected @@ -375,7 +375,7 @@ class NotificationControllerTest extends MediaWikiIntegrationTestCase { ); } - public static function PageLinkedTitleMutedByUserDataProvider(): array { + public static function pageLinkedTitleMutedByUserDataProvider(): array { return [ [ 123,