minor #22211 Fix @param in PHPDoc (GromNaN)
This PR was merged into the 3.2 branch.
Discussion
----------
Fix @param in PHPDoc
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Errors reported by Sami API Doc generator on branch 3.2
```
ERROR: The "factory" @param tag variable name is wrong (should be "objectLoader") on "Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader::__construct" in src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php:68
ERROR: The "objectLoader" @param tag variable name is wrong (should be "factory") on "Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader::__construct" in src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php:68
ERROR: "7" @param tags are expected but only "6" found on "Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController::__construct" in src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php:50
ERROR: "3" @param tags are expected but only "2" found on "Symfony\Component\Asset\PathPackage::__construct" in src/Symfony/Component/Asset/PathPackage.php:35
ERROR: "2" @param tags are expected but only "1" found on "Symfony\Component\Cache\Adapter\PhpArrayAdapter::create" in src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php:64
ERROR: "3" @param tags are expected but only "1" found on "Symfony\Component\Cache\Adapter\RedisAdapter::__construct" in src/Symfony/Component/Cache/Adapter/RedisAdapter.php:39
ERROR: The "format" @param tag variable name is wrong (should be "fileLinkFormat") on "Symfony\Component\Debug\ExceptionHandler::setFileLinkFormat" in src/Symfony/Component/Debug/ExceptionHandler.php:90
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\Compiler\Compiler::addPass" in src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:73
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\Compiler\PassConfig::addPass" in src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php:97
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass" in src/Symfony/Component/DependencyInjection/ContainerBuilder.php:311
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface::getProxyFactoryCode" in src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php:41
ERROR: "0" @param tags are expected but only "1" found on "Symfony\Component\HttpFoundation\Request::isMethodSafe" in src/Symfony/Component/HttpFoundation/Request.php:1458
ERROR: "5" @param tags are expected but only "6" found on "Symfony\Component\Serializer\Normalizer\AbstractNormalizer::instantiateObject" in src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php:291
```
Errors that cannot be fixed are due to new arguments not included in the method signature for backward compatibility, but actually used by the code.
Commits
-------
6ed9d0e4c1
Fix @param in PHPDoc
This commit is contained in:
commit
924337fcb0
@ -61,9 +61,9 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
|
|||||||
* loaded objects
|
* loaded objects
|
||||||
* @param IdReader $idReader The reader for the object
|
* @param IdReader $idReader The reader for the object
|
||||||
* IDs.
|
* IDs.
|
||||||
|
* @param null|EntityLoaderInterface $objectLoader The objects loader
|
||||||
* @param ChoiceListFactoryInterface $factory The factory for creating
|
* @param ChoiceListFactoryInterface $factory The factory for creating
|
||||||
* the loaded choice list
|
* the loaded choice list
|
||||||
* @param null|EntityLoaderInterface $objectLoader The objects loader
|
|
||||||
*/
|
*/
|
||||||
public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null)
|
public function __construct($manager, $class, $idReader = null, $objectLoader = null, $factory = null)
|
||||||
{
|
{
|
||||||
|
@ -40,12 +40,13 @@ class ProfilerController
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param UrlGeneratorInterface $generator The URL Generator
|
* @param UrlGeneratorInterface $generator The URL Generator
|
||||||
* @param Profiler $profiler The profiler
|
* @param Profiler $profiler The profiler
|
||||||
* @param \Twig_Environment $twig The twig environment
|
* @param \Twig_Environment $twig The twig environment
|
||||||
* @param array $templates The templates
|
* @param array $templates The templates
|
||||||
* @param string $toolbarPosition The toolbar position (top, bottom, normal, or null -- use the configuration)
|
* @param string $toolbarPosition The toolbar position (top, bottom, normal, or null -- use the configuration)
|
||||||
* @param string $baseDir The project root directory
|
* @param ContentSecurityPolicyHandler $cspHandler The Content-Security-Policy handler
|
||||||
|
* @param string $baseDir The project root directory
|
||||||
*/
|
*/
|
||||||
public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'bottom', ContentSecurityPolicyHandler $cspHandler = null, $baseDir = null)
|
public function __construct(UrlGeneratorInterface $generator, Profiler $profiler = null, \Twig_Environment $twig, array $templates, $toolbarPosition = 'bottom', ContentSecurityPolicyHandler $cspHandler = null, $baseDir = null)
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ class PathPackage extends Package
|
|||||||
/**
|
/**
|
||||||
* @param string $basePath The base path to be prepended to relative paths
|
* @param string $basePath The base path to be prepended to relative paths
|
||||||
* @param VersionStrategyInterface $versionStrategy The version strategy
|
* @param VersionStrategyInterface $versionStrategy The version strategy
|
||||||
|
* @param ContextInterface|null $context The context
|
||||||
*/
|
*/
|
||||||
public function __construct($basePath, VersionStrategyInterface $versionStrategy, ContextInterface $context = null)
|
public function __construct($basePath, VersionStrategyInterface $versionStrategy, ContextInterface $context = null)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,8 @@ class PhpArrayAdapter implements AdapterInterface
|
|||||||
* stores arrays in its latest versions. This factory method decorates the given
|
* stores arrays in its latest versions. This factory method decorates the given
|
||||||
* fallback pool with this adapter only if the current PHP version is supported.
|
* fallback pool with this adapter only if the current PHP version is supported.
|
||||||
*
|
*
|
||||||
* @param string $file The PHP file were values are cached
|
* @param string $file The PHP file were values are cached
|
||||||
|
* @param CacheItemPoolInterface $fallbackPool Fallback for old PHP versions or opcache disabled
|
||||||
*
|
*
|
||||||
* @return CacheItemPoolInterface
|
* @return CacheItemPoolInterface
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +34,9 @@ class RedisAdapter extends AbstractAdapter
|
|||||||
private $redis;
|
private $redis;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redisClient
|
* @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redisClient The redis client
|
||||||
|
* @param string $namespace The default namespace
|
||||||
|
* @param integer $defaultLifetime The default lifetime
|
||||||
*/
|
*/
|
||||||
public function __construct($redisClient, $namespace = '', $defaultLifetime = 0)
|
public function __construct($redisClient, $namespace = '', $defaultLifetime = 0)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ class ExceptionHandler
|
|||||||
/**
|
/**
|
||||||
* Sets the format for links to source files.
|
* Sets the format for links to source files.
|
||||||
*
|
*
|
||||||
* @param string|FileLinkFormatter $format The format for links to source files
|
* @param string|FileLinkFormatter $fileLinkFormat The format for links to source files
|
||||||
*
|
*
|
||||||
* @return string The previous file link format
|
* @return string The previous file link format
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user