Skip to content

Remove redundant type in @param occurrences #54523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions src/Symfony/Bridge/Doctrine/Attribute/MapEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ class MapEntity extends ValueResolver
{
/**
* @param class-string|null $class The entity class
* @param string|null $objectManager Specify the object manager used to retrieve the entity
* @param string|null $expr An expression to fetch the entity using the {@see https://symfony.com/doc/current/components/expression_language.html ExpressionLanguage} syntax.
* @param $objectManager Specify the object manager used to retrieve the entity
* @param $expr An expression to fetch the entity using the {@see https://symfony.com/doc/current/components/expression_language.html ExpressionLanguage} syntax.
* Any request attribute are available as a variable, and your entity repository in the 'repository' variable.
* @param array<string, string>|null $mapping Configures the properties and values to use with the findOneBy() method
* The key is the route placeholder name and the value is the Doctrine property name
* @param string[]|null $exclude Configures the properties that should be used in the findOneBy() method by excluding
* one or more properties so that not all are used
* @param bool|null $stripNull Whether to prevent null values from being used as parameters in the query (defaults to false)
* @param $stripNull Whether to prevent null values from being used as parameters in the query (defaults to false)
* @param string[]|string|null $id If an id option is configured and matches a route parameter, then the resolver will find by the primary key
* @param bool|null $evictCache If true, forces Doctrine to always fetch the entity from the database instead of cache (defaults to false)
* @param $evictCache If true, forces Doctrine to always fetch the entity from the database instead of cache (defaults to false)
*/
public function __construct(
public ?string $class = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract class AbstractDoctrineExtension extends Extension
protected array $drivers = [];

/**
* @param array $objectManager A configured object manager
* @param $objectManager A configured object manager
*
* @throws \InvalidArgumentException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
private array $eventManagers = [];

/**
* @param string $managerTemplate sprintf() template for generating the event
* manager's service ID for a connection name
* @param string $tagPrefix Tag prefix for listeners
* @param $managerTemplate sprintf() template for generating the event
* manager's service ID for a connection name
* @param $tagPrefix Tag prefix for listeners
*/
public function __construct(
private readonly string $connectionsParameter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
* The $aliasMap parameter can be used to define bundle namespace shortcuts like the
* DoctrineBundle provides automatically for objects in the default Entity/Document folder.
*
* @param Definition|Reference $driver Driver DI definition or reference
* @param string[] $namespaces List of namespaces handled by $driver
* @param string[] $managerParameters list of container parameters that could
* hold the manager name
* @param string $driverPattern Pattern for the metadata driver service name
* @param string|false $enabledParameter Service container parameter that must be
* present to enable the mapping. Set to false
* to not do any check, optional.
* @param string $configurationPattern Pattern for the Configuration service name,
* for example 'doctrine.orm.%s_configuration'.
* @param string $registerAliasMethodName Method name to call on the configuration service. This
* depends on the Doctrine implementation.
* For example addEntityNamespace.
* @param string[] $aliasMap Map of alias to namespace
* @param $driver Driver DI definition or reference
* @param string[] $namespaces List of namespaces handled by $driver
* @param string[] $managerParameters list of container parameters that could
* hold the manager name
* @param $driverPattern Pattern for the metadata driver service name
* @param $enabledParameter Service container parameter that must be
* present to enable the mapping. Set to false
* to not do any check, optional.
* @param $configurationPattern Pattern for the Configuration service name,
* for example 'doctrine.orm.%s_configuration'.
* @param $registerAliasMethodName Method name to call on the configuration service. This
* depends on the Doctrine implementation.
* For example addEntityNamespace.
* @param string[] $aliasMap Map of alias to namespace
*/
public function __construct(
Definition|Reference $driver,
Expand Down Expand Up @@ -155,8 +155,8 @@ protected function getChainDriverServiceName(ContainerBuilder $container): strin
/**
* Create the service definition for the metadata driver.
*
* @param ContainerBuilder $container Passed on in case an extending class
* needs access to the container
* @param $container Passed on in case an extending class
* needs access to the container
*/
protected function getDriver(ContainerBuilder $container): Definition|Reference
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DoctrineChoiceLoader extends AbstractChoiceLoader
* passed which optimizes the object loading for one of the Doctrine
* mapper implementations.
*
* @param string $class The class name of the loaded objects
* @param $class The class name of the loaded objects
*/
public function __construct(
private readonly ObjectManager $manager,
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function createChoiceLabel(object $choice): string
* a single-column integer ID. In that case, the value of the field is
* the ID of the object. That ID is also used as field name.
*
* @param string $value The choice value. Corresponds to the object's ID here.
* @param $value The choice value. Corresponds to the object's ID here.
*
* @internal This method is public to be usable as callback. It should not
* be used in user code.
Expand All @@ -78,8 +78,8 @@ public static function createChoiceName(object $choice, int|string $key, string
* For instance in ORM two query builders with an equal SQL string and
* equal parameters are considered to be equal.
*
* @param object $queryBuilder A query builder, type declaration is not present here as there
* is no common base class for the different implementations
* @param $queryBuilder A query builder, type declaration is not present here as there
* is no common base class for the different implementations
*
* @internal This method is public to be usable as callback. It should not
* be used in user code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ class UniqueEntity extends Constraint
public bool|array|string $ignoreNull = true;

/**
* @param array|string $fields The combination of fields that must contain unique values or a set of options
* @param $fields The combination of fields that must contain unique values or a set of options
* @param bool|string[]|string $ignoreNull The combination of fields that ignore null values
* @param string|null $em The entity manager used to query for uniqueness instead of the manager of this class
* @param string|null $entityClass The entity class to enforce uniqueness on instead of the current class
* @param string|null $repositoryMethod The repository method to check uniqueness instead of findBy. The method will receive as its argument
* a fieldName => value associative array according to the fields option configuration
* @param string|null $errorPath Bind the constraint violation to this field instead of the first one in the fields option configuration
* @param $em The entity manager used to query for uniqueness instead of the manager of this class
* @param $entityClass The entity class to enforce uniqueness on instead of the current class
* @param $repositoryMethod The repository method to check uniqueness instead of findBy. The method will receive as its argument
* a fieldName => value associative array according to the fields option configuration
* @param $errorPath Bind the constraint violation to this field instead of the first one in the fields option configuration
*/
public function __construct(
array|string $fields,
Expand Down
10 changes: 5 additions & 5 deletions src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ final class ConsoleHandler extends AbstractProcessingHandler implements EventSub
private array $consoleFormatterOptions;

/**
* @param OutputInterface|null $output The console output to use (the handler remains disabled when passing null
* until the output is set, e.g. by using console events)
* @param bool $bubble Whether the messages that are handled can bubble up the stack
* @param array $verbosityLevelMap Array that maps the OutputInterface verbosity to a minimum logging
* level (leave empty to use the default mapping)
* @param $output The console output to use (the handler remains disabled when passing null
* until the output is set, e.g. by using console events)
* @param $bubble Whether the messages that are handled can bubble up the stack
* @param $verbosityLevelMap Array that maps the OutputInterface verbosity to a minimum logging
* level (leave empty to use the default mapping)
*/
public function __construct(?OutputInterface $output = null, bool $bubble = true, array $verbosityLevelMap = [], array $consoleFormatterOptions = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
final class HttpCodeActivationStrategy implements ActivationStrategyInterface
{
/**
* @param array $exclusions each exclusion must have a "code" and "urls" keys
* @param $exclusions each exclusion must have a "code" and "urls" keys
*/
public function __construct(
private RequestStack $requestStack,
Expand Down
10 changes: 5 additions & 5 deletions src/Symfony/Bridge/Monolog/Handler/MailerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ protected function write(LogRecord $record): void
/**
* Send a mail with the given content.
*
* @param string $content formatted email body to be sent
* @param array $records the array of log records that formed this content
* @param $content formatted email body to be sent
* @param $records the array of log records that formed this content
*/
protected function send(string $content, array $records): void
{
Expand All @@ -71,7 +71,7 @@ protected function send(string $content, array $records): void
/**
* Gets the formatter for the Message subject.
*
* @param string $format The format of the subject
* @param $format The format of the subject
*/
protected function getSubjectFormatter(string $format): FormatterInterface
{
Expand All @@ -81,8 +81,8 @@ protected function getSubjectFormatter(string $format): FormatterInterface
/**
* Creates instance of Message to be sent.
*
* @param string $content formatted email body to be sent
* @param array $records Log records that formed the content
* @param $content formatted email body to be sent
* @param $records Log records that formed the content
*/
protected function buildMessage(string $content, array $records): Email
{
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/PhpUnit/ClassExistsMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ClassExistsMock
/**
* Configures the classes to be checked upon existence.
*
* @param array $classes Mocked class names as keys (case-sensitive, without leading root namespace slash) and booleans as values
* @param $classes Mocked class names as keys (case-sensitive, without leading root namespace slash) and booleans as values
*/
public static function withMockedClasses(array $classes): void
{
Expand All @@ -33,7 +33,7 @@ public static function withMockedClasses(array $classes): void
/**
* Configures the enums to be checked upon existence.
*
* @param array $enums Mocked enums names as keys (case-sensitive, without leading root namespace slash) and booleans as values
* @param $enums Mocked enums names as keys (case-sensitive, without leading root namespace slash) and booleans as values
*/
public static function withMockedEnums(array $enums): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ class Configuration
private $logFile;

/**
* @param int[] $thresholds A hash associating groups to thresholds
* @param string $regex Will be matched against messages, to decide whether to display a stack trace
* @param bool[] $verboseOutput Keyed by groups
* @param string $ignoreFile The path to the ignore deprecation patterns file
* @param bool $generateBaseline Whether to generate or update the baseline file
* @param string $baselineFile The path to the baseline file
* @param string|null $logFile The path to the log file
* @param int[] $thresholds A hash associating groups to thresholds
* @param $regex Will be matched against messages, to decide whether to display a stack trace
* @param bool[] $verboseOutput Keyed by groups
* @param $ignoreFile The path to the ignore deprecation patterns file
* @param $generateBaseline Whether to generate or update the baseline file
* @param $baselineFile The path to the baseline file
* @param $logFile The path to the log file
*/
private function __construct(array $thresholds = [], string $regex = '', array $verboseOutput = [], string $ignoreFile = '', bool $generateBaseline = false, string $baselineFile = '', ?string $logFile = null)
{
Expand Down Expand Up @@ -305,7 +305,7 @@ public function getLogFile(): ?string
}

/**
* @param string $serializedConfiguration An encoded string, for instance max[total]=1234&max[indirect]=42
* @param $serializedConfiguration An encoded string, for instance max[total]=1234&max[indirect]=42
*/
public static function fromUrlEncodedString(string $serializedConfiguration): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/DnsMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DnsMock
/**
* Configures the mock values for DNS queries.
*
* @param array $hosts Mocked hosts as keys, arrays of DNS records as returned by dns_get_record() as values
* @param $hosts Mocked hosts as keys, arrays of DNS records as returned by dns_get_record() as values
*/
public static function withMockedHosts(array $hosts): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SymfonyTestsListenerTrait
private $checkNumAssertions = false;

/**
* @param array $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive)
* @param $mockedNamespaces List of namespaces, indexed by mocked features (time-sensitive or dns-sensitive)
*/
public function __construct(array $mockedNamespaces = [])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class HttpFoundationFactory implements HttpFoundationFactoryInterface
{
/**
* @param int $responseBufferMaxLength The maximum output buffering size for each iteration when sending the response
* @param $responseBufferMaxLength The maximum output buffering size for each iteration when sending the response
*/
public function __construct(
private readonly int $responseBufferMaxLength = 16372,
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Twig/Attribute/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
class Template
{
/**
* @param string $template The name of the template to render
* @param $template The name of the template to render
* @param string[]|null $vars The controller method arguments to pass to the template
* @param bool $stream Enables streaming the template
* @param $stream Enables streaming the template
*/
public function __construct(
public string $template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TwigErrorRenderer implements ErrorRendererInterface
private \Closure|bool $debug;

/**
* @param bool|callable $debug The debugging mode as a boolean or a callable that should return it
* @param $debug The debugging mode as a boolean or a callable that should return it
*/
public function __construct(
private Environment $twig,
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Twig/Extension/LogoutUrlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getFunctions(): array
/**
* Generates the relative logout URL for the firewall.
*
* @param string|null $key The firewall key or null to use the current firewall key
* @param $key The firewall key or null to use the current firewall key
*/
public function getLogoutPath(?string $key = null): string
{
Expand All @@ -48,7 +48,7 @@ public function getLogoutPath(?string $key = null): string
/**
* Generates the absolute logout URL for the firewall.
*
* @param string|null $key The firewall key or null to use the current firewall key
* @param $key The firewall key or null to use the current firewall key
*/
public function getLogoutUrl(?string $key = null): string
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getUrl(string $name, array $parameters = [], bool $schemeRelativ
* - path('route', {'param1': 'value1', 'param2': 'value2'})
* If param1 and param2 reference placeholder in the route, it would still be safe. But we don't know.
*
* @param Node $argsNode The arguments of the path/url function
* @param $argsNode The arguments of the path/url function
*
* @return array An array with the contexts the URL is safe
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/Extension/TranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getTranslationNodeVisitor(): TranslationNodeVisitor
}

/**
* @param array|string $arguments Can be the locale as a string when $message is a TranslatableInterface
* @param $arguments Can be the locale as a string when $message is a TranslatableInterface
*/
public function trans(string|\Stringable|TranslatableInterface|null $message, array|string $arguments = [], ?string $domain = null, ?string $locale = null, ?int $count = null): string
{
Expand Down
Loading