diff --git a/composer/Plugin/Scaffold/Handler.php b/composer/Plugin/Scaffold/Handler.php index 8ee27990cec97fa0e46795467cea47895e12fa72..cf43d9d13871871cb83cf9edca5a614f718e2a9d 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\Package[] $allowed_packages + * @param \Composer\Package\PackageInterface[] $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 133640cc4be8e94892eac7a48651fbc674c6d2cd..c4eb88b939a2ef18b1d3eb3221dca2d7bc1853c4 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 cb98bca41e82fea7b725b77bba61fb9deabf986d..7298ee3ab4e08dbedb3b3d82b32b818af15db1ed 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 $id + * @param string|null $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 0449ba6f6b81471ed3aaee2aabcef4729c0a9ab6..362d098cb767cefea6158fb268796f3240a891df 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 9aa26cc5bfc182450850ba8916f4d3a3ecc75741..41014c9648d639653966eec545e4035c1911fa32 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -105,7 +105,8 @@ public function setContext($context) { /** * Gets the source string(s) if the translation has plurals. * - * @return string or array $translation + * @return string|array + * The source string or array of strings if it has plurals. */ public function getSource() { return $this->source; @@ -124,7 +125,8 @@ public function setSource($source) { /** * Gets the translation string(s) if the translation has plurals. * - * @return string or array $translation + * @return string|array + * The translation string or array of strings if it has plurals. */ 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 92f5155b793043f2397d6228642d53a6226cc580..8a83e795ee76816ef2ce3b560ee5fd7e38d81c5b 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 + * @var string|null */ protected $selector; @@ -47,7 +47,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf /** * Constructs an InsertCommand object. * - * @param string $selector + * @param string|null $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 d5b6cafb758be4f06de77d7d470dec1f34cc5d55..c19487f291f4f72ef06573df8ea8aaf752302ca1 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 string[] $forms - * (optional) An array of form class names keyed by a string. + * @param array<string, string|false> $forms + * (optional) An array of form class names or FALSE, 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 d6ac429ce38b2df8c53351874c88ac99b806e0e0..5d90459d4f6c9571768aefc902626374727a9f18 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 $storage + * @param \Drupal\Core\Config\StorageInterface|null $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 0786bf8385f9b2fea2d704e6d921564387226601..4ba14f3ada8612609ef98a55a8df37a505cdc1bb 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 string[] $module_filenames + * @param \Drupal\Core\Extension\Extension[] $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 9501cbfcdd611552b76baf78b62207bf446e1476..c481b8b15e0ae369947db78e0607798aa0786435 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 $value + * @param string|array|bool $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 8ef7823ffcfb84f5f63ac02eb8dbb4c5e4121ff0..7f07479cb99603850e4996c206ba6e6fb12ab2c3 100644 --- a/core/modules/rest/tests/src/Functional/ResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/ResourceTestBase.php @@ -407,7 +407,7 @@ protected function assertResourceResponse($expected_status_code, $expected_body, * * @param int $expected_status_code * The expected response status. - * @param string $expected_message + * @param string|false $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 a323484a68fa9ae23a2ffbe7bbd38d7714ea1f85..06c212486ce602dd4289b37ea833fc5deccfce55 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 string $subdir - * The wanted subdir. + * @param bool $subdir + * TRUE to use a subdir. */ protected function setupRequestStack($subdir) { $server = [];