minor #38408 Fix type annotation in ExpressionLanguage\Token (m-vo)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix type annotation in ExpressionLanguage\Token

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The expected argument `$type` should be a string - the strict comparison would always fail with the current annotated types (`array|int`).

See the constructor + constants for reference:
7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L33)

7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L25-L30)

Commits
-------

bfde15b728 Fix type annotation
This commit is contained in:
Fabien Potencier 2020-10-04 18:40:24 +02:00
commit a60c0af953
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class Token
/**
* Tests the current token for a type and/or a value.
*
* @param array|int $type The type to test
* @param string $type The type to test
* @param string|null $value The token value
*
* @return bool