8000 Remove useless docblocks by nicolas-grekas · Pull Request #24724 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Remove useless docblocks #24724

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

Merged
merged 1 commit into from
Nov 5, 2017
Merged
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
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
*/
class DoctrineValidationPass implements CompilerPassInterface
{
/**
* @var string
*/
private $managerType;

/**
* @param string $managerType
*/
public function __construct($managerType)
{
$this->managerType = $managerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
*/
class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
{
/**
* @var string|string[]
*/
private $connections;
private $eventManagers;
private $managerTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
* present to enable the mapping. Set to false
* to not do any check, optional.
* @param string $configurationPattern Pattern for the Configuration service name
* @param string $registerAliasMethodName name of Configuration class method to
* @param string $registerAliasMethodName Name of Configuration class method to
* register alias
* @param string[] $aliasMap Map of alias to namespace
*/
Expand Down Expand Up @@ -178,7 +178,7 @@ protected function getChainDriverServiceName(ContainerBuilder $container)
/**
* Create the service definition for the metadata driver.
*
* @param ContainerBuilder $container passed on in case an extending class
* @param ContainerBuilder $container Passed on in case an extending class
Copy link
Member

Choose a reason for hiding this comment

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

such changes should probably be reverted as #24149 added a cs rule against doing sentences in phpdoc (no uppercase, no ending dot)

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand the reasoning given there.
In fact, having an uppercase letter makes the docblock easier to read as the eyes more obviously can spot when a new column starts.
The code base is also using uppercase everywhere else. This is not by chance, but because it is most natural to others.
In short, this is something I did on purpose.

Copy link
Member

Choose a reason for hiding this comment

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

And I fully agree, we just did the contrary when merging it.

* needs access to the container
*
* @return Definition|Reference the metadata driver to add to all chain drivers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
class DoctrineParserCache implements ParserCacheInterface
{
/**
* @var Cache
*/
private $cache;

public function __construct(Cache $cache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,10 @@
*/
class DoctrineChoiceLoader implements ChoiceLoaderInterface
{
/**
* @var ChoiceListFactoryInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

phpstorm requires those annotations for autocomplete AFAIK

Copy link
Member Author

Choose a reason for hiding this comment

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

Phpstorm doesn't need them when the type is inferable from the constructor.

*/
private $factory;

/**
* @var ObjectManager
*/
private $manager;

/**
* @var string
*/
private $class;

/**
* @var IdReader
*/
private $idReader;

/**
* @var null|EntityLoaderInterface
*/
private $objectLoader;

/**
Expand All @@ -60,13 +41,10 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
* passed which optimizes the object loading for one of the Doctrine
* mapper implementations.
*
* @param ChoiceListFactoryInterface $factory The factory for creating
* the loaded choice list
* @param ChoiceListFactoryInterface $factory The factory for creating the loaded choice list
* @param ObjectManager $manager The object manager
* @param string $class The class name of the
* loaded objects
* @param IdReader $idReader the reader for the object
* IDs
* @param string $class The class name of the loaded objects
* @param IdReader $idReader The reader for the object IDs
* @param null|EntityLoaderInterface $objectLoader The objects loader
*/
public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null)
Expand Down
19 changes: 0 additions & 19 deletions src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,10 @@
*/
class IdReader
{
/**
* @var ObjectManager
*/
private $om;

/**
* @var ClassMetadata
*/
private $classMetadata;

/**
* @var bool
*/
private $singleId;

/**
* @var bool
*/
private $intId;

/**
* @var string
*/
private $idField;

/**
Expand Down
7 changes: 0 additions & 7 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ class DoctrineOrmExtension extends AbstractExtension
{
protected $registry;

/**
* @var PropertyAccessorInterface
*/
private $propertyAccessor;

/**
* @var ChoiceListFactoryInterface
*/
private $choiceListFactory;

public function __construct(ManagerRegistry $registry, PropertyAccessorInterface $propertyAccessor = null, ChoiceListFactoryInterface $choiceListFactory = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
*/
class UniqueEntityValidator extends ConstraintValidator
{
/**
* @var ManagerRegistry
*/
private $registry;

public function __construct(ManagerRegistry $registry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@
*/
class ProxyDumper implements DumperInterface
{
/**
* @var string
*/
private $salt;

/**
* @var LazyLoadingValueHolderGenerator
*/
private $proxyGenerator;

/**
* @var BaseGeneratorStrategy
*/
private $classGenerator;

/**
Expand Down
4 changes: 0 additions & 4 deletions src/Symfony/Bridge/Twig/Extension/StopwatchExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
class StopwatchExtension extends AbstractExtension
{
private $stopwatch;

/**
* @var bool
*/
private $enabled;

public function __construct(Stopwatch $stopwatch = null, $enabled = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
*/
class TranslationDefaultDomainNodeVisitor extends AbstractNodeVisitor
{
/**
* @var Scope
*/
private $scope;

public function __construct()
Expand Down
5 changes: 0 additions & 5 deletions src/Symfony/Bridge/Twig/Translation/TwigExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
*/
private $prefix = '';

/**
* The twig environment.
*
* @var Environment
*/
private $twig;

public function __construct(Environment $twig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
class SessionListener extends BaseSessionListener
{
/**
* @var ContainerInterface
*/
private $container;

public function __construct(ContainerInterface $container)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function addLoader($format, LoaderInterface $loader)
/**
* Loads translation messages from a directory to the catalogue.
*
* @param string $directory the directory to look into
* @param MessageCatalogue $catalogue the catalogue
* @param string $directory The directory to look into
* @param MessageCatalogue $catalogue The catalogue
*/
public function loadMessages($directory, MessageCatalogue $catalogue)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
class ExceptionController
{
protected $twig;
protected $debug;

/**
* @var bool Show error (false) or exception (true) pages by default
* @param Environment $twig
* @param bool $debug Show error (false) or exception (true) pages by default
*/
protected $debug;

public function __construct(Environment $twig, $debug)
{
$this->twig = $twig;
Expand Down
6 changes: 0 additions & 6 deletions src/Symfony/Component/ClassLoader/XcacheClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
class XcacheClassLoader
{
private $prefix;

/**
* A class loader object that implements the findFile() method.
*
* @var object
*/
private $decorated;

/**
Expand Down
3 changes: 0 additions & 3 deletions src/Symfony/Component/Config/ConfigCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
*/
class ConfigCacheFactory implements ConfigCacheFactoryInterface
{
/**
* @var bool Debug flag passed to the ConfigCache
*/
private $debug;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/Definition/ArrayNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getChildren()
/**
* Sets the xml remappings that should be performed.
*
* @param array $remappings an array of the form array(array(string, string))
* @param array $remappings An array of the form array(array(string, string))
*/
public function setXmlRemappings(array $remappings)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function children()
/**
* Sets a prototype for child nodes.
*
* @param string $type the type of node
* @param string $type The type of node
*
* @return NodeDefinition
*/
Expand Down Expand Up @@ -97,7 +97,7 @@ public function addDefaultsIfNotSet()
*
* This method is applicable to prototype nodes only.
*
* @param int|string|array|null $children the number of children|The child name|The children names to be added
* @param int|string|array|null $children The number of children|The child name|The children names to be added
*
* @return $this
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function arrayNode($name)
/**
* Creates a child scalar node.
*
* @param string $name the name of the node
* @param string $name The name of the node
*
* @return ScalarNodeDefinition The child node
*/
Expand All @@ -85,7 +85,7 @@ public function booleanNode($name)
/**
* Creates a child integer node.
*
* @param string $name the name of the node
* @param string $name The name of the node
*
* @return IntegerNodeDefinition The child node
*/
Expand All @@ -97,7 +97,7 @@ public function integerNode($name)
/**
* Creates a child float node.
*
* @param string $name the name of the node
* @param string $name The name of the node
*
* @return FloatNodeDefinition The child node
*/
Expand Down
6 changes: 0 additions & 6 deletions src/Symfony/Component/Console/ConsoleEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ final class ConsoleEvents
* instance.
*
* @Event
*
* @var string
*/
const COMMAND = 'console.command';

Expand All @@ -40,8 +38,6 @@ final class ConsoleEvents
* instance.
*
* @Event
*
* @var string
*/
const TERMINATE = 'console.terminate';

Expand All @@ -54,8 +50,6 @@ final class ConsoleEvents
* instance.
*
* @Event
*
* @var string
*/
const EXCEPTION = 'console.exception';
}
2 changes: 0 additions & 2 deletions src/Symfony/Component/Console/Event/ConsoleCommandEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class ConsoleCommandEvent extends ConsoleEvent

/**
* Indicates if the command should be run or skipped.
*
* @var bool
*/
private $commandShouldRun = true;

Expand Down
5 changes: 0 additions & 5 deletions src/Symfony/Component/Console/Helper/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@
*/
class ProgressBar
{
// options
private $barWidth = 28;
private $barChar;
private $emptyBarChar = '-';
private $progressChar = '>';
private $format;
private $internalFormat;
private $redrawFreq = 1;

/**
* @var OutputInterface
*/
private $output;
private $step = 0;
private $max;
Expand Down
3 changes: 0 additions & 3 deletions src/Symfony/Component/Console/Helper/TableHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class TableHelper extends Helper
const LAYOUT_BORDERLESS = 1;
const LAYOUT_COMPACT = 2;

/**
* @var Table
*/
private $table;

public function __construct($triggerDeprecationError = true)
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Input/InputDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function hasShortcut($name)
/**
* Gets an InputOption by shortcut.
*
* @param string $shortcut the Shortcut name
* @param string $shortcut The Shortcut name
*
* @return InputOption An InputOption object
*/
Expand Down
Loading
0