Issue #3478200 by quietone, alexpott: Fix MissingParamType in core/lib/Drupal/Component

merge-requests/9804/merge
Alex Pott 2024-10-25 19:02:00 +01:00
parent 21b6e13cad
commit 2277edbcdd
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
14 changed files with 24 additions and 21 deletions

View File

@ -31,7 +31,7 @@ interface PoStreamInterface {
/**
* Set the URI of the PO stream that is going to be read or written.
*
* @param $uri
* @param string $uri
* URI string to set for this stream.
*/
public function setURI($uri);

View File

@ -541,7 +541,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
/**
* Parses a string in quotes.
*
* @param $string
* @param string $string
* A string specified with enclosing quotes.
*
* @return bool|string
@ -572,7 +572,7 @@ class PoStreamReader implements PoStreamInterface, PoReaderInterface {
/**
* Generates a short, one-string version of the passed comment array.
*
* @param $comment
* @param string[] $comment
* An array of strings containing a comment.
*
* @return string

View File

@ -20,7 +20,7 @@ interface PoWriterInterface extends PoMetadataInterface {
*
* @param PoReaderInterface $reader
* Reader to read PoItems from.
* @param $count
* @param int $count
* Amount of items to read from $reader to write. If -1, all items are
* read from $reader.
*/

View File

@ -15,7 +15,7 @@ class Graph {
/**
* Instantiates the depth first search object.
*
* @param $graph
* @param array $graph
* A three dimensional associated array, with the first keys being the names
* of the vertices, these can be strings or numbers. The second key is
* 'edges' and the third one are again vertices, each such key representing
@ -87,13 +87,13 @@ class Graph {
/**
* Performs a depth-first search on a graph.
*
* @param $state
* @param array $state
* An associative array. The key 'last_visit_order' stores a list of the
* vertices visited. The key components stores list of vertices belonging
* to the same the component.
* @param $start
* @param string|int $start
* An arbitrary vertex where we started traversing the graph.
* @param $component
* @param string|int|null $component
* The component of the last vertex.
*
* @see \Drupal\Component\Graph\Graph::searchAndSort()

View File

@ -17,7 +17,7 @@ class FileReadOnlyStorage implements PhpStorageInterface {
/**
* Constructs this FileStorage object.
*
* @param $configuration
* @param string[] $configuration
* An associative array, containing at least two keys (the rest are ignored):
* - directory: The directory where the files should be stored.
* - bin: The storage bin. Multiple storage objects can be instantiated with

View File

@ -217,9 +217,9 @@ class MTimeProtectedFastFileStorage extends FileStorage {
/**
* A brute force tempnam implementation supporting streams.
*
* @param $directory
* @param string $directory
* The directory where the temporary filename will be created.
* @param $prefix
* @param string $prefix
* The prefix of the generated temporary filename.
*
* @return string

View File

@ -24,7 +24,7 @@ class HtmlEscapedText implements MarkupInterface, \Countable {
/**
* Constructs an HtmlEscapedText object.
*
* @param $string
* @param string $string
* The string to escape. This value will be cast to a string.
*/
public function __construct($string) {

View File

@ -246,7 +246,7 @@ class PhpTransliteration implements TransliterationInterface {
/**
* Look up the generic replacement for a UTF-8 character code.
*
* @param $code
* @param int $code
* The UTF-8 character code.
* @param string $unknown_character
* (optional) The character to substitute for characters without entries in
@ -277,7 +277,7 @@ class PhpTransliteration implements TransliterationInterface {
* transliterations in this language. The character codes can be for any valid
* Unicode character, independent of the number of bytes.
*
* @param $langcode
* @param string $langcode
* Code for the language to read.
*/
protected function readLanguageOverrides($langcode) {
@ -304,7 +304,7 @@ class PhpTransliteration implements TransliterationInterface {
* transliterations of these characters into US-ASCII. Note that the maximum
* Unicode character that can be encoded in this way is 4 bytes.
*
* @param $bank
* @param int $bank
* First two bytes of the Unicode character, or 0 for the ASCII range.
*/
protected function readGenericData($bank) {

View File

@ -10,7 +10,7 @@ class Color {
/**
* Validates whether a hexadecimal color value is syntactically correct.
*
* @param $hex
* @param string $hex
* The hexadecimal string to validate. May contain a leading '#'. May use
* the shorthand notation (e.g., '123' for '112233').
*

View File

@ -54,7 +54,7 @@ class Crypt {
/**
* Returns a URL-safe, base64 encoded string of highly randomized bytes.
*
* @param $count
* @param int $count
* The number of random bytes to fetch and base64 encode.
*
* @return string

View File

@ -19,7 +19,7 @@ class DeprecatedArray extends \ArrayObject {
*
* @param array $values
* The array values.
* @param $message
* @param string $message
* The deprecation message.
*/
public function __construct(array $values, $message) {

View File

@ -14,7 +14,7 @@ class Environment {
* The memory required for the operation, expressed as a number of bytes with
* optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G, 6GiB, 8bytes,
* 9mbytes).
* @param $memory_limit
* @param string|null $memory_limit
* (optional) The memory limit for the operation, expressed as a number of
* bytes with optional SI or IEC binary unit prefix (e.g. 2, 3K, 5MB, 10G,
* 6GiB, 8bytes, 9mbytes). If no value is passed, the current PHP

View File

@ -17,7 +17,7 @@ class Timer {
* If you start and stop the same timer multiple times, the measured intervals
* will be accumulated.
*
* @param $name
* @param string $name
* The name of the timer.
*/
public static function start($name) {

View File

@ -66,14 +66,17 @@
<rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
<rule ref="Drupal.Commenting.DocCommentStar"/>
<rule ref="Drupal.Commenting.FileComment"/>
<rule ref="Drupal.Commenting.FunctionComment">
<exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/>
<exclude name="Drupal.Commenting.FunctionComment.Missing"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingParamType"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="Drupal.Commenting.FunctionComment.MissingParamType">
<include-pattern>core/lib/Component/*</include-pattern>
</rule>
<rule ref="Drupal.Commenting.GenderNeutralComment"/>
<rule ref="Drupal.Commenting.HookComment"/>
<rule ref="Drupal.Commenting.InlineComment">