Skip to content

Commit b171a18

Browse files
author
nod_
committed
Revert "Issue #3463440 by mstrelan, smustgrave: Fix param docs identified by phpstan"
This reverts commit e07e27a6705b2da29c4c9b44dc000e09019586d5.
1 parent f6f0477 commit b171a18

File tree

10 files changed

+14
-16
lines changed

10 files changed

+14
-16
lines changed

lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ protected function dumpCallable($callable) {
353353
/**
354354
* Gets a private service definition in a suitable format.
355355
*
356-
* @param string|null $id
356+
* @param string $id
357357
* The ID of the service to get a private definition for.
358358
* @param \Symfony\Component\DependencyInjection\Definition $definition
359359
* The definition to process.

lib/Drupal/Component/Gettext/PoHeader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PoHeader {
3939
/**
4040
* Author(s) of the file.
4141
*
42-
* @var string[]
42+
* @var string
4343
*/
4444
protected $authors;
4545

lib/Drupal/Component/Gettext/PoItem.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ public function setContext($context) {
105105
/**
106106
* Gets the source string(s) if the translation has plurals.
107107
*
108-
* @return string|array
109-
* The source string or array of strings if it has plurals.
108+
* @return string or array $translation
110109
*/
111110
public function getSource() {
112111
return $this->source;
@@ -125,8 +124,7 @@ public function setSource($source) {
125124
/**
126125
* Gets the translation string(s) if the translation has plurals.
127126
*
128-
* @return string|array
129-
* The translation string or array of strings if it has plurals.
127+
* @return string or array $translation
130128
*/
131129
public function getTranslation() {
132130
return $this->translation;

lib/Drupal/Core/Ajax/InsertCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf
2424
* If the command is a response to a request from an #ajax form element then
2525
* this value can be NULL.
2626
*
27-
* @var string|null
27+
* @var string
2828
*/
2929
protected $selector;
3030

@@ -47,7 +47,7 @@ class InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterf
4747
/**
4848
* Constructs an InsertCommand object.
4949
*
50-
* @param string|null $selector
50+
* @param string $selector
5151
* A CSS selector.
5252
* @param string|array $content
5353
* The content that will be inserted in the matched element(s), either a

lib/Drupal/Core/Block/Attribute/Block.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class Block extends Plugin {
2525
* the plugin. The array is keyed by context names.
2626
* @param class-string|null $deriver
2727
* (optional) The deriver class.
28-
* @param array<string, string|false> $forms
29-
* (optional) An array of form class names or FALSE, keyed by a string.
28+
* @param string[] $forms
29+
* (optional) An array of form class names keyed by a string.
3030
*/
3131
public function __construct(
3232
public readonly string $id,

lib/Drupal/Core/Config/ConfigInstallerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function installDefaultConfig($type, $name);
4040
* - it's a configuration entity.
4141
* - its dependencies can be met.
4242
*
43-
* @param \Drupal\Core\Config\StorageInterface|null $storage
43+
* @param \Drupal\Core\Config\StorageInterface $storage
4444
* (optional) The configuration storage to search for optional
4545
* configuration. If not provided, all enabled extension's optional
4646
* configuration directories including the install profile's will be

lib/Drupal/Core/Extension/ModuleInstaller.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ function ($definition) {
616616
/**
617617
* Updates the kernel module list.
618618
*
619-
* @param \Drupal\Core\Extension\Extension[] $module_filenames
619+
* @param string[] $module_filenames
620620
* The list of installed modules.
621621
*/
622622
protected function updateKernel($module_filenames) {

lib/Drupal/Core/Test/FunctionalTestSetupTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ protected function writeSettings(array $settings) {
198198
*
199199
* @param string $name
200200
* The name of the parameter.
201-
* @param string|array|bool $value
201+
* @param string $value
202202
* The value of the parameter.
203203
*/
204204
protected function setContainerParameter($name, $value) {

modules/rest/tests/src/Functional/ResourceTestBase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ protected function assertResourceResponse($expected_status_code, $expected_body,
434434
*
435435
* @param int $expected_status_code
436436
* The expected response status.
437-
* @param string|false $expected_message
437+
* @param string $expected_message
438438
* The expected error message.
439439
* @param \Psr\Http\Message\ResponseInterface $response
440440
* The error response to assert.

tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ public function testAssembleWithStartingSlashEnabledProcessing(): void {
197197
/**
198198
* Setups the request stack for a given subdir.
199199
*
200-
* @param bool $subdir
201-
* TRUE to use a subdir.
200+
* @param string $subdir
201+
* The wanted subdir.
202202
*/
203203
protected function setupRequestStack($subdir) {
204204
$server = [];

0 commit comments

Comments
 (0)