From 1d1669b4f4e5838b88421a80d2aa729857d14d9a Mon Sep 17 00:00:00 2001 From: nod_ <nod_@598310.no-reply.drupal.org> Date: Wed, 7 Aug 2024 01:15:49 +0200 Subject: [PATCH] Revert "Issue #3463440 by mstrelan, smustgrave: Fix param docs identified by phpstan" This reverts commit e07e27a6705b2da29c4c9b44dc000e09019586d5. --- composer/Plugin/Scaffold/Handler.php | 2 +- composer/Plugin/VendorHardening/VendorHardeningPlugin.php | 2 +- .../DependencyInjection/Dumper/OptimizedPhpArrayDumper.php | 2 +- core/lib/Drupal/Component/Gettext/PoHeader.php | 2 +- core/lib/Drupal/Component/Gettext/PoItem.php | 6 ++---- core/lib/Drupal/Core/Ajax/InsertCommand.php | 4 ++-- core/lib/Drupal/Core/Block/Attribute/Block.php | 4 ++-- core/lib/Drupal/Core/Config/ConfigInstallerInterface.php | 2 +- core/lib/Drupal/Core/Extension/ModuleInstaller.php | 2 +- core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php | 2 +- core/modules/rest/tests/src/Functional/ResourceTestBase.php | 2 +- .../Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php | 4 ++-- 12 files changed, 16 insertions(+), 18 deletions(-) diff --git a/composer/Plugin/Scaffold/Handler.php b/composer/Plugin/Scaffold/Handler.php index cf43d9d13871..8ee27990cec9 100644 --- a/composer/Plugin/Scaffold/Handler.php +++ b/composer/Plugin/Scaffold/Handler.php @@ -196,7 +196,7 @@ protected function getVendorPath() { /** * Gets a consolidated list of file mappings from all allowed packages. * - * @param \Composer\Package\PackageInterface[] $allowed_packages + * @param \Composer\Package\Package[] $allowed_packages * A multidimensional array of file mappings, as returned by * self::getAllowedPackages(). * diff --git a/composer/Plugin/VendorHardening/VendorHardeningPlugin.php b/composer/Plugin/VendorHardening/VendorHardeningPlugin.php index c4eb88b939a2..133640cc4be8 100644 --- a/composer/Plugin/VendorHardening/VendorHardeningPlugin.php +++ b/composer/Plugin/VendorHardening/VendorHardeningPlugin.php @@ -331,7 +331,7 @@ public function cleanPackage(PackageInterface $package): void { * * @param \Composer\Package\PackageInterface $package * The package to clean. - * @param string[] $paths_for_package + * @param string $paths_for_package * List of directories in $package_name to remove */ protected function cleanPathsForPackage(PackageInterface $package, $paths_for_package): void { diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php index 7298ee3ab4e0..cb98bca41e82 100644 --- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php +++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php @@ -353,7 +353,7 @@ protected function dumpCallable($callable) { /** * Gets a private service definition in a suitable format. * - * @param string|null $id + * @param string $id * The ID of the service to get a private definition for. * @param \Symfony\Component\DependencyInjection\Definition $definition * The definition to process. diff --git a/core/lib/Drupal/Component/Gettext/PoHeader.php b/core/lib/Drupal/Component/Gettext/PoHeader.php index 362d098cb767..0449ba6f6b81 100644 --- a/core/lib/Drupal/Component/Gettext/PoHeader.php +++ b/core/lib/Drupal/Component/Gettext/PoHeader.php @@ -39,7 +39,7 @@ class PoHeader { /** * Author(s) of the file. * - * @var string[] + * @var string */ protected $authors; diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php index 41014c9648d6..9aa26cc5bfc1 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -105,8 +105,7 @@ public function setContext($context) { /** * Gets the source string(s) if the translation has plurals. * - * @return string|array - * The source string or array of strings if it has plurals. + * @return string or array $translation */ public function getSource() { return $this->source; @@ -125,8 +124,7 @@ public function setSource($source) { /** * Gets the translation string(s) if the translation has plurals. * - * @return string|array - * The translation string or array of strings if it has plurals. + * @return string or array $translation */ public function getTranslation() { return $this->translation; diff --git a/core/lib/Drupal/Core/Ajax/InsertCommand.php b/core/lib/Drupal/Core/Ajax/InsertCommand.php index 8a83e795ee76..92f5155b7930 100644 --- a/core/lib/Drupal/Core/Ajax/InsertCommand.php +++ b/core/lib/Drupal/Core/Ajax/InsertCommand.php @@ -24,7 +24,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf * If the command is a response to a request from an #ajax form element then * this value can be NULL. * - * @var string|null + * @var string */ protected $selector; @@ -47,7 +47,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf /** * Constructs an InsertCommand object. * - * @param string|null $selector + * @param string $selector * A CSS selector. * @param string|array $content * The content that will be inserted in the matched element(s), either a diff --git a/core/lib/Drupal/Core/Block/Attribute/Block.php b/core/lib/Drupal/Core/Block/Attribute/Block.php index c19487f291f4..d5b6cafb758b 100644 --- a/core/lib/Drupal/Core/Block/Attribute/Block.php +++ b/core/lib/Drupal/Core/Block/Attribute/Block.php @@ -25,8 +25,8 @@ class Block extends Plugin { * the plugin. The array is keyed by context names. * @param class-string|null $deriver * (optional) The deriver class. - * @param array<string, string|false> $forms - * (optional) An array of form class names or FALSE, keyed by a string. + * @param string[] $forms + * (optional) An array of form class names keyed by a string. */ public function __construct( public readonly string $id, diff --git a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php index 5d90459d4f6c..d6ac429ce38b 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php @@ -40,7 +40,7 @@ public function installDefaultConfig($type, $name); * - it's a configuration entity. * - its dependencies can be met. * - * @param \Drupal\Core\Config\StorageInterface|null $storage + * @param \Drupal\Core\Config\StorageInterface $storage * (optional) The configuration storage to search for optional * configuration. If not provided, all enabled extension's optional * configuration directories including the install profile's will be diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php index 3aed970d8e6c..8ef97b89a754 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -616,7 +616,7 @@ function ($definition) { /** * Updates the kernel module list. * - * @param \Drupal\Core\Extension\Extension[] $module_filenames + * @param string[] $module_filenames * The list of installed modules. */ protected function updateKernel($module_filenames) { diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php index d795a2eb7d4a..5e0795239a81 100644 --- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @@ -198,7 +198,7 @@ protected function writeSettings(array $settings) { * * @param string $name * The name of the parameter. - * @param string|array|bool $value + * @param string $value * The value of the parameter. */ protected function setContainerParameter($name, $value) { diff --git a/core/modules/rest/tests/src/Functional/ResourceTestBase.php b/core/modules/rest/tests/src/Functional/ResourceTestBase.php index e28270fe02e6..96fc9072d719 100644 --- a/core/modules/rest/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/ResourceTestBase.php @@ -434,7 +434,7 @@ protected function assertResourceResponse($expected_status_code, $expected_body, * * @param int $expected_status_code * The expected response status. - * @param string|false $expected_message + * @param string $expected_message * The expected error message. * @param \Psr\Http\Message\ResponseInterface $response * The error response to assert. diff --git a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php index 06c212486ce6..a323484a68fa 100644 --- a/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php @@ -197,8 +197,8 @@ public function testAssembleWithStartingSlashEnabledProcessing(): void { /** * Setups the request stack for a given subdir. * - * @param bool $subdir - * TRUE to use a subdir. + * @param string $subdir + * The wanted subdir. */ protected function setupRequestStack($subdir) { $server = []; -- GitLab