diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php index 58798dae0f812a5a684ed4aa90300622264619f3..b0dcca81105a183ec490b18cf1da00c44660cfe3 100644 --- a/core/.phpstan-baseline.php +++ b/core/.phpstan-baseline.php @@ -39831,12 +39831,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Common/AddFeedTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\DateFormatAccessControlHandlerTest\\:\\:testAccessProvider\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Entity\\\\EntityReferenceSelection\\\\EntityReferenceSelectionAccessTest\\:\\:addDefaultCommentField\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -39873,12 +39867,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/src/Kernel/Form/FormElementMaxlengthTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\MenuAccessControlHandlerTest\\:\\:testAccessProvider\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Kernel\\\\Migrate\\\\d6\\\\MigrateActionConfigsTest\\:\\:assertConfigSchema\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', diff --git a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php index 3b0f0e3dea089be340d5e5e72cf82a24c04f3214..0d5483370be83fcb299fa1ce968b63003b0fcb34 100644 --- a/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/DateFormatAccessControlHandlerTest.php @@ -49,7 +49,7 @@ protected function setUp(): void { /** * @covers ::checkAccess * @covers ::checkCreateAccess - * @dataProvider testAccessProvider + * @dataProvider providerTestAccess */ public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result): void { @@ -70,7 +70,7 @@ public function testAccess($permissions, $which_entity, $view_label_access_resul static::assertEquals($create_access_result, $this->accessControlHandler->createAccess(NULL, $user, [], TRUE)); } - public static function testAccessProvider() { + public static function providerTestAccess(): array { $c = new ContainerBuilder(); $cache_contexts_manager = (new Prophet())->prophesize(CacheContextsManager::class); $cache_contexts_manager->assertValidTokens()->willReturn(TRUE); diff --git a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php index d9431356d0ed360b21e4929f3598d5c2453b106f..57e1758cb8f85188ccfbe9f6556789ded3197ffb 100644 --- a/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php +++ b/core/modules/system/tests/src/Kernel/MenuAccessControlHandlerTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { /** * @covers ::checkAccess * @covers ::checkCreateAccess - * @dataProvider testAccessProvider + * @dataProvider providerTestAccess */ public function testAccess($permissions, $which_entity, $view_label_access_result, $view_access_result, $update_access_result, $delete_access_result, $create_access_result): void { $user = $this->drupalCreateUser($permissions); @@ -65,7 +65,7 @@ public function testAccess($permissions, $which_entity, $view_label_access_resul static::assertEquals($create_access_result, $this->accessControlHandler->createAccess(NULL, $user, [], TRUE)); } - public static function testAccessProvider() { + public static function providerTestAccess(): array { // RefinableCacheableDependencyTrait::addCacheContexts() only needs the // container to perform an assertion, but we can't use the container here, // so disable assertions for the purposes of this test.