8000 [cs] remove unused doc blocks by TomasVotruba · Pull Request #24931 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[cs] remove unused doc blocks #24931

N 8000 ew 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
wants to merge 2 commits into from
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
Jump to file
Failed to load files.
Loading
Diff view 8000
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public function __construct(ManagerRegistry $registry)
/**
* Adds the stack logger for a connection.
*
* @param string $name
* @param DebugStack $logger
* @param string $name
*/
public function addLogger($name, DebugStack $logger)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ abstract class AbstractDoctrineExtension extends Extension
protected $drivers = array();

/**
* @param array $objectManager A configured object manager
* @param ContainerBuilder $container A ContainerBuilder instance
* @param array $objectManager A configured object manager
*
* @throws \InvalidArgumentException
*/
Expand Down Expand Up @@ -117,7 +116,6 @@ protected function setMappingDriverAlias($mappingConfig, $mappingName)
/**
* Register the mapping driver configuration for later use with the object managers metadata driver chain.
*
* @param array $mappingConfig
* @param string $mappingName
*
* @throws \InvalidArgumentException
Expand Down Expand Up @@ -172,8 +170,7 @@ protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \Re
/**
* Register all the collected mapping information with the object manager by registering the appropriate mapping drivers.
*
* @param array $objectManager
* @param ContainerBuilder $container A ContainerBuilder instance
* @param array $objectManager
*/
protected function registerMappingDrivers($objectManager, ContainerBuilder $container)
{
Expand Down Expand Up @@ -225,7 +222,6 @@ protected function registerMappingDrivers($objectManager, ContainerBuilder $cont
/**
* Assertion if the specified mapping information is valid.
*
* @param array $mappingConfig
* @param string $objectManagerName
*
* @throws \InvalidArgumentException
Expand All @@ -252,8 +248,7 @@ protected function assertValidMappingConfiguration(array $mappingConfig, $object
/**
* Detects what metadata driver to use for the supplied directory.
*
* @param string $dir A directory path
* @param ContainerBuilder $container A ContainerBuilder instance
* @param string $dir A directory path
*
* @return string|null A metadata driver short name, if one can be detected
*/
Expand Down Expand Up @@ -286,9 +281,8 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container)
/**
* Loads a configured object manager metadata, query or result cache driver.
*
* @param array $objectManager A configured object manager
* @param ContainerBuilder $container A ContainerBuilder instance
* @param string $cacheName
* @param array $objectManager A configured object manager
* @param string $cacheName
*
* @throws \InvalidArgumentException in case of unknown driver type
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
10000
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@ public function configureOptions(OptionsResolver $resolver)
/**
* Return the default loader object.
*
* @param ObjectManager $manager
* @param mixed $queryBuilder
* @param string $class
* @param mixed $queryBuilder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mixed params could be removed as well as mixed does not give any useful information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep this, since mixed type is comming to PHP and it would make easier transition to scalar type, as in string, int etc. before

* @param string $class
*
* @return EntityLoaderInterface
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ public function configureOptions(OptionsResolver $resolver)
/**
* Return the default loader object.
*
* @param ObjectManager $manager
* @param QueryBuilder $queryBuilder
* @param string $class
* @param QueryBuilder $queryBuilder
* @param string $class
*
* @return ORMQueryBuilderLoader
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public function __construct(ManagerRegistry $registry)
}

/**
* @param object $entity
* @param Constraint $constraint
* @param object $entity
*
* @throws UnexpectedTypeException
* @throws ConstraintDefinitionException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ protected function warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array
}

/**
* @param string $cacheDir
* @param ArrayAdapter $arrayAdapter
* @param string $cacheDir
*
* @return bool false if there is nothing to warm-up
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class AnnotationsCacheWarmer extends AbstractPhpFileCacheWarmer
private $excludeRegexp;

/**
* @param Reader $annotationReader
* @param string $phpArrayFile The PHP file where annotations are cached
* @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered annotations are cached
* @param string $phpArrayFile The PHP file where annotations are cached
* @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered annotations are cached
*/
public function __construct(Reader $annotationReader, string $phpArrayFile, CacheItemPoolInterface $fallbackPool, string $excludeRegexp = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class TemplateFinder implements TemplateFinderInterface
private $templates;

/**
* @param KernelInterface $kernel A KernelInterface instance
* @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
* @param string $rootDir The directory where global templates can be stored
* @param string $rootDir The directory where global templates can be stored
*/
public function __construct(KernelInterface $kernel, TemplateNameParserInterface $parser, string $rootDir)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ class ValidatorCacheWarmer extends AbstractPhpFileCacheWarmer
private $validatorBuilder;

/**
* @param ValidatorBuilderInterface $validatorBuilder
* @param string $phpArrayFile The PHP file where metadata are cached
* @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered metadata are cached
* @param string $phpArrayFile The PHP file where metadata are cached
* @param CacheItemPoolInterface $fallbackPool The pool where runtime-discovered metadata are cached
*/
public function __construct(ValidatorBuilderInterface $validatorBuilder, string $phpArrayFile, CacheItemPoolInterface $fallbackPool)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ abstract protected function describeContainerTags(ContainerBuilder $builder, arr
* * name: name of described service
*
* @param Definition|Alias|object $service
* @param array $options
* @param ContainerBuilder|null $builder
*/
abstract protected function describeContainerService($service, array $options = array(), ContainerBuilder $builder = null);
Expand Down Expand Up @@ -167,7 +166,6 @@ abstract protected function describeEventDispatcherListeners(EventDispatcherInte
* Describes a callable.
*
* @param callable $callable
* @param array $options
*/
abstract protected function describeCallable($callable, array $options = array());

Expand Down Expand Up @@ -214,8 +212,7 @@ protected function formatParameter($value)
}

/**
* @param ContainerBuilder $builder
* @param string $serviceId
* @param string $serviceId
*
* @return mixed
*/
Expand All @@ -235,8 +232,7 @@ protected function resolveServiceDefinition(ContainerBuilder $builder, $serviceI
}

/**
* @param ContainerBuilder $builder
* @param bool $showPrivate
* @param bool $showPrivate
*
* @return array
*/
Expand Down
8 changes: 3 additions & 5 deletions src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ abstract class HttpCache extends BaseHttpCache
protected $kernel;

/**
* @param HttpKernelInterface $kernel An HttpKernelInterface instance
* @param string $cacheDir The cache directory (default used if null)
* @param string $cacheDir The cache directory (default used if null)
*/
public function __construct(HttpKernelInterface $kernel, string $cacheDir = null)
{
Expand All @@ -43,9 +42,8 @@ public function __construct(HttpKernelInterface $kernel, string $cacheDir = null
/**
* Forwards the Request to the backend and returns the Response.
*
* @param Request $request A Request instance
* @param bool $raw Whether to catch exceptions or not
* @param Response $entry A Response instance (the stale entry if present, null otherwise)
* @param bool $raw Whether to catch exceptions or not
* @param Response $entry A Response instance (the stale entry if present, null otherwise)
*
* @return Response A Response instance
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ class DelegatingLoader extends BaseDelegatingLoader
protected $parser;
private $loading = false;

/**
* @param ControllerNameParser $parser A ControllerNameParser instance
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
*/
public function __construct(ControllerNameParser $parser, LoaderResolverInterface $resolver)
{
$this->parser = $parser;
Expand Down
7 changes: 3 additions & 4 deletions src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ class Router extends BaseRouter implements WarmableInterface, ServiceSubscriberI
private $collectedParameters = array();

/**
* @param ContainerInterface $container A ContainerInterface instance
* @param mixed $resource The main resource to load
* @param array $options An array of options
* @param RequestContext $context The context
* @param mixed $resource The main resource to load
* @param array $options An array of options
* @param RequestContext $context The context
*/
public function __construct(ContainerInterface $container, $resource, array $options = array(), RequestContext $context = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public function getName()
*
* The theme format is "<Bundle>:<Controller>".
*
* @param FormView $view A FormView instance
* @param string|array $themes A theme or an array of theme
* @param bool $useDefaultThemes If true, will use default themes defined in the renderer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class TemplateLocator implements FileLocatorInterface
private $cacheHits = array();

/**
* @param FileLocatorInterface $locator A FileLocatorInterface instance
* @param string $cacheDir The cache path
* @param string $cacheDir The cache path
*/
public function __construct(FileLocatorInterface $locator, string $cacheDir = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public function testGetUserWithEmptyContainer()
}

/**
* @param $token
*
* @return Container
*/
private function getContainerWithTokenStorage($token = null)
Expand Down
10 changes: 4 additions & 6 deletions src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@ class Translator extends BaseTranslator implements WarmableInterface
private $resources = array();

/**
* Available options:
* Available options:.
*
* * cache_dir: The cache directory (or null to disable caching)
* * debug: Whether to enable debugging or not (false by default)
* * resource_files: List of translation resources available grouped by locale.
*
* @param ContainerInterface $container A ContainerInterface instance
* @param MessageFormatterInterface $formatter The message formatter
* @param string $defaultLocale
* @param array $loaderIds An array of loader Ids
* @param array $options An array of options
* @param MessageFormatterInterface $formatter The message formatter
* @param array $loaderIds An array of loader Ids
* @param array $options An array of options
*
* @throws InvalidArgumentException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ final public function addOption($name, $default = null)
* Subclasses must return the id of a service which implements the
* AuthenticationProviderInterface.
*
* @param ContainerBuilder $container
* @param string $id The unique id of the firewall
* @param array $config The options array for this listener
* @param string $userProviderId The id of the user provider
* @param string $id The unique id of the firewall
* @param array $config The options array for this listener
* @param string $userProviderId The id of the user provider
*
* @return string never null, the id of the authentication provider
*/
Expand Down
10 changes: 4 additions & 6 deletions src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class ExceptionController
protected $debug;

/**
* @param Environment $twig
* @param bool $debug Show error (false) or exception (true) pages by default
* @param bool $debug Show error (false) or exception (true) pages by default
*/
public function __construct(Environment $twig, bool $debug)
{
Expand Down Expand Up @@ -88,10 +87,9 @@ protected function getAndCleanOutputBuffering($startObLevel)
}

/**
* @param Request $request
* @param string $format
* @param int $code An HTTP response status code
* @param bool $showException
* @param string $format
* @param int $code An HTTP response status code
* @param bool $showException
*
* @return string
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Symfony/Bundle/TwigBundle/TemplateIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ class TemplateIterator implements \IteratorAggregate
private $paths;

/**
* @param KernelInterface $kernel A KernelInterface instance
* @param string $rootDir The directory where global templates can be stored
* @param array $paths Additional Twig paths to warm
* @param string $rootDir The directory where global templates can be stored
* @param array $paths Additional Twig paths to warm
*/
public function __construct(KernelInterface $kernel, string $rootDir, array $paths = array())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class WebProfilerExtension extends Extension
/**
* Loads the web profiler configuration.
*
* @param array $configs An array of configuration settings
* @param ContainerBuilder $container A ContainerBuilder instance
* @param array $configs An array of configuration settings
*/
public function load(array $configs, ContainerBuilder $container)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function __construct(Profiler $profiler, Environment $twig, array $templa
/**
* Gets the template name for a given panel.
*
* @param Profile $profile
* @param string $panel
* @param string $panel
*
* @return mixed
*
Expand Down
6 changes: 2 additions & 4 deletions src/Symfony/Component/BrowserKit/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ public function click(Link $link)
/**
* Submits a form.
*
* @param Form $form A Form instance
* @param array $values An array of form field values
*
* @return Crawler
Expand Down Expand Up @@ -354,7 +353,7 @@ protected function doRequestInProcess($request)
unlink($deprecationsFile);
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
if ($deprecation[0]) {
trigger_error($deprecation[1], E_USER_DEPRECATED);
@trigger_error($deprecation[1], E_USER_DEPRECATED);
} else {
@trigger_error($deprecation[1], E_USER_DEPRECATED);
}
Expand Down Expand Up @@ -585,8 +584,7 @@ protected function getAbsoluteUri($uri)
/**
* Makes a request from a Request object directly.
*
* @param Request $request A Request instance
* @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload())
* @param bool $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload())
*
* @return Crawler
*/
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Component/Cache/Adapter/ArrayAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class ArrayAdapter implements AdapterInterface, LoggerAwareInterface, Resettable
private $createCacheItem;

/**
* @param int $defaultLifetime
* @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise
*/
public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class CacheDataCollector extends DataCollector implements LateDataCollectorInter
private $instances = array();

/**
* @param string $name
* @param TraceableAdapter $instance
* @param string $name
*/
public function addInstance($name, TraceableAdapter $instance)
{
Expand Down
Loading
0