8000 minor #24149 [CS] Apply phpdoc_annotation_without_dot (keradus) · symfony/symfony@687ad65 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 687ad65

Browse files
committed
minor #24149 [CS] Apply phpdoc_annotation_without_dot (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #24149). Discussion ---------- [CS] Apply phpdoc_annotation_without_dot | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | n/a | Fixed tickets | n/a | License | MIT | Doc PR | n/a Rule was manually applied here : #19198 In same PR, fixer for this rule was requested, later implementation was approved by Symfony in PHP-CS-Fixer/PHP-CS-Fixer#2020 . Rule is converting single sentence to not a sentence, dropping final dot and lowercasing first word. If there are multiple sentences, it doesn't make any changes. Status quo is that some annotation are in the middle - having first word uppercased, but no final stop. Let us fix grammar by finishing applying the rule. If, for some reason, you don't want to follow that rule that was requested by Symfony, please provide reasoning. If it's to some edge-case bug, simply raise that bug issue. If due to some other reasons, please send a PR to drop it from `@Symfony` ruleset. Info: I did manually reviewed every single change of this PR. Commits ------- 7a97b49 [CS] Apply phpdoc_annotation_without_dot
2 parents bcfe152 + 7a97b49 commit 687ad65

File tree

93 files changed

+301
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+301
-303
lines changed

.php_cs.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ return PhpCsFixer\Config::create()
1212
'no_unreachable_default_argument_value' => false,
1313
'braces' => array('allow_single_line_closure' => true),
1414
'heredoc_to_nowdoc' => false,
15-
'phpdoc_annotation_without_dot' => false,
1615
))
1716
->setRiskyAllowed(true)
1817
->setFinder(

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container)
301301
* @param ContainerBuilder $container A ContainerBuilder instance
302302
* @param string $cacheName
303303
*
304-
* @throws \InvalidArgumentException In case of unknown driver type.
304+
* @throws \InvalidArgumentException in case of unknown driver type
305305
*/
306306
protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName)
307307
{

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
108108
*
109109
* @param Definition|Reference $driver Driver DI definition or reference
110110
* @param string[] $namespaces List of namespaces handled by $driver
111-
* @param string[] $managerParameters List of container parameters that could
112-
* hold the manager name.
111+
* @param string[] $managerParameters list of container parameters that could
112+
* hold the manager name
113113
* @param string $driverPattern Pattern for the metadata driver service name
114114
* @param string|false $enabledParameter Service container parameter that must be
115115
* present to enable the mapping. Set to false
116116
* to not do any check, optional.
117117
* @param string $configurationPattern Pattern for the Configuration service name
118-
* @param string $registerAliasMethodName Name of Configuration class method to
119-
* register alias.
118+
* @param string $registerAliasMethodName name of Configuration class method to
119+
* register alias
120120
* @param string[] $aliasMap Map of alias to namespace
121121
*/
122122
public function __construct($driver, array $namespaces, array $managerParameters, $driverPattern, $enabledParameter = false, $configurationPattern = '', $registerAliasMethodName = '', array $aliasMap = array())
@@ -174,7 +174,7 @@ public function process(ContainerBuilder $container)
174174
* @return string The name of the chain driver service
175175
*
176176
* @throws ParameterNotFoundException if non of the managerParameters has a
177-
* non-empty value.
177+
* non-empty value
178178
*/
179179
protected function getChainDriverServiceName(ContainerBuilder $container)
180180
{
@@ -185,7 +185,7 @@ protected function getChainDriverServiceName(ContainerBuilder $container)
185185
* Create the service definition for the metadata driver.
186186
*
187187
* @param ContainerBuilder $container passed on in case an extending class
188-
* needs access to the container.
188+
* needs access to the container
189189
*
190190
* @return Definition|Reference the metadata driver to add to all chain drivers
191191
*/
@@ -202,7 +202,7 @@ protected function getDriver(ContainerBuilder $container)
202202
* @return string a service definition name
203203
*
204204
* @throws ParameterNotFoundException if none of the managerParameters has a
205-
* non-empty value.
205+
* non-empty value
206206
*/
207207
private function getConfigurationServiceName(ContainerBuilder $container)
208208
{
@@ -219,7 +219,7 @@ private function getConfigurationServiceName(ContainerBuilder $container)
219219
*
220220
* @return string The name of the active manager
221221
*
222-
* @throws ParameterNotFoundException If none of the managerParameters is found in the container.
222+
* @throws ParameterNotFoundException if none of the managerParameters is found in the container
223223
*/
224224
private function getManagerName(ContainerBuilder $container)
225225
{

src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
6565
* @param ObjectManager $manager The object manager
6666
* @param string $class The class name of the
6767
* loaded objects
68-
* @param IdReader $idReader The reader for the object
69-
* IDs.
68+
* @param IdReader $idReader the reader for the object
69+
* IDs
7070
* @param null|EntityLoaderInterface $objectLoader The objects loader
7171
*/
7272
public function __construct(ChoiceListFactoryInterface $factory, ObjectManager $manager, $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null)

src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ public function getIndicesForValues(array $values)
389389
*
390390
* @param mixed $entity The choice to create an index for
391391
*
392-
* @return int|string A unique index containing only ASCII letters,
393-
* digits and underscores.
392+
* @return int|string a unique index containing only ASCII letters,
393+
* digits and underscores
394394
*/
395395
protected function createIndex($entity)
396396
{

src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Bernhard Schussek <bschussek@gmail.com>
2222
*
23-
* @internal This class is meant for internal use only.
23+
* @internal this class is meant for internal use only
2424
*/
2525
class IdReader
2626
{
@@ -79,8 +79,8 @@ public function __construct(ObjectManager $om, ClassMetadata $classMetadata)
7979
/**
8080
* Returns whether the class has a single-column ID.
8181
*
82-
* @return bool Returns `true` if the class has a single-column ID and
83-
* `false` otherwise.
82+
* @return bool returns `true` if the class has a single-column ID and
83+
* `false` otherwise
8484
*/
8585
public function isSingleId()
8686
{
@@ -90,8 +90,8 @@ public function isSingleId()
9090
/**
9191
* Returns whether the class has a single-column integer ID.
9292
*
93-
* @return bool Returns `true` if the class has a single-column integer ID
94-
* and `false` otherwise.
93+
* @return bool returns `true` if the class has a single-column integer ID
94+
* and `false` otherwise
9595
*/
9696
public function isIntId()
9797
{

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function block(FormView $view, $blockName, array $variables = array())
257257
*
258258
* @return string A CSRF token
259259
*
260-
* @throws \BadMethodCallException When no CSRF provider was injected in the constructor.
260+
* @throws \BadMethodCallException when no CSRF provider was injected in the constructor
261261
*/
262262
public function csrfToken($intention)
263263
{

src/Symfony/Component/Config/Definition/BaseNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class BaseNode implements NodeInterface
3838
* @param string $name The name of the node
3939
* @param NodeInterface $parent The parent of this node
4040
*
41-
* @throws \InvalidArgumentException if the name contains a period.
41+
* @throws \InvalidArgumentException if the name contains a period
4242
*/
4343
public function __construct($name, NodeInterface $parent = null)
4444
{

src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public function addDefaultsIfNotSet()
9797
/**
9898
* Adds children with a default value when none are defined.
9999
*
100-
* @param int|string|array|null $children The number of children|The child name|The children names to be added
101-
*
102100
* This method is applicable to prototype nodes only.
103101
*
102+
* @param int|string|array|null $children the number of children|The child name|The children names to be added
103+
*
104104
* @return $this
105105
*/
106106
public function addDefaultChildrenIfNoneSet($children = null)

src/Symfony/Component/Console/Question/Question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function getValidator()
187187
*
188188
* @return $this
189189
*
190-
* @throws \InvalidArgumentException In case the number of attempts is invalid.
190+
* @throws \InvalidArgumentException in case the number of attempts is invalid
191191
*/
192192
public function setMaxAttempts($attempts)
193193
{

src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true);
208208

209209
$xError = array(
210210
'type' => E_USER_DEPRECATED,
211-
'message' => 'The Test\Symfony\Component\Debug\Tests\\'.$class.' class '.$type.' Symfony\Component\Debug\Tests\Fixtures\\'.$super.' that is deprecated but this is a test deprecation notice.',
211+
'message' => 'The Test\Symfony\Component\Debug\Tests\\'.$class.' class '.$type.' Symfony\Component\Debug\Tests\Fixtures\\'.$super.' that is deprecated but this is a test deprecation notice',
212212
);
213213

214214
$this->assertSame($xError, $lastError);

src/Symfony/Component/Debug/Tests/Fixtures/DeprecatedClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* @deprecated but this is a test
7-
* deprecation notice.
7+
* deprecation notice
88
* @foobar
99
*/
1010
class DeprecatedClass

src/Symfony/Component/Debug/Tests/Fixtures/DeprecatedInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* @deprecated but this is a test
7-
* deprecation notice.
7+
* deprecation notice
88
* @foobar
99
*/
1010
interface DeprecatedInterface

src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function process(ContainerBuilder $container)
5151
*
5252
* @param ServiceReferenceGraphEdge[] $edges An array of Edges
5353
*
54-
* @throws ServiceCircularReferenceException When a circular reference is found.
54+
* @throws ServiceCircularReferenceException when a circular reference is found
5555
*/
5656
private function checkOutEdges(array $edges)
5757
{

src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function process(ContainerBuilder $container)
8585
*
8686
* @param array $arguments An array of Reference objects
8787
*
88-
* @throws RuntimeException when there is a reference to an abstract definition.
88+
* @throws RuntimeException when there is a reference to an abstract definition
8989
*/
9090
private function validateReferences(array $arguments)
9191
{

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function setFactoryMethod($factoryMethod)
140140
*
141141
* @return $this
142142
*
143-
* @throws InvalidArgumentException In case the decorated service id and the new decorated service id are equals.
143+
* @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals
144144
*/
145145
public function setDecoratedService($id, $renamedId = null)
146146
{

src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function resolve()
151151
*
152152
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
153153
* @throws ParameterCircularReferenceException if a circular reference if detected
154-
* @throws RuntimeException when a given parameter has a type problem.
154+
* @throws RuntimeException when a given parameter has a type problem
155155
*/
156156
public function resolveValue($value, array $resolving = array())
157157
{
@@ -181,7 +181,7 @@ public function resolveValue($value, array $resolving = array())
181181
*
182182
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
183183
* @throws ParameterCircularReferenceException if a circular reference if detected
184-
* @throws RuntimeException when a given parameter has a type problem.
184+
* @throws RuntimeException when a given parameter has a type problem
185185
*/
186186
public function resolveString($value, array $resolving = array())
187187
{

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function clear()
7171
*
7272
* @param \DOMNodeList|\DOMNode|array|string|null $node A node
7373
*
74-
* @throws \InvalidArgumentException When node is not the expected type.
74+
* @throws \InvalidArgumentException when node is not the expected type
7575
*/
7676
public function add($node)
7777
{

src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ interface EventDispatcherInterface
2626
* @param string $eventName The name of the event to dispatch. The name of
2727
* the event is the name of the method that is
2828
* invoked on listeners.
29-
* @param Event $event The event to pass to the event handlers/listeners
30-
* If not supplied, an empty Event instance is created.
29+
* @param Event $event the event to pass to the event handlers/listeners
30+
* If not supplied, an empty Event instance is created
3131
*
3232
* @return Event
3333
*/

src/Symfony/Component/EventDispatcher/GenericEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getSubject()
6363
*
6464
* @return mixed Contents of array key
6565
*
66-
* @throws \InvalidArgumentException If key is not found.
66+
* @throws \InvalidArgumentException if key is not found
6767
*/
6868
public function getArgument($key)
6969
{
@@ -132,7 +132,7 @@ public function hasArgument($key)
132132
*
133133
* @return mixed
134134
*
135-
* @throws \InvalidArgumentException If key does not exist in $this->args.
135+
* @throws \InvalidArgumentException if key does not exist in $this->args
136136
*/
137137
public function offsetGet($key)
138138
{

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public function isAbsolutePath($file)
525525
* @param null|int $mode The file mode (octal). If null, file permissions are not modified
526526
* Deprecated since version 2.3.12, to be removed in 3.0.
527527
*
528-
* @throws IOException If the file cannot be written to.
528+
* @throws IOException if the file cannot be written to
529529
*/
530530
public function dumpFile($filename, $content, $mode = 0666)
531531
{

src/Symfony/Component/Finder/Finder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ public function getIterator()
681681
*
682682
* @return $this
683683
*
684-
* @throws \InvalidArgumentException When the given argument is not iterable.
684+
* @throws \InvalidArgumentException when the given argument is not iterable
685685
*/
686686
public function append($iterator)
687687
{

src/Symfony/Component/Form/AbstractRendererEngine.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ abstract protected function loadResourceForBlockName($cacheKey, FormView $view,
139139
*
140140
* @see getResourceForBlockHierarchy()
141141
*
142-
* @param string $cacheKey The cache key used for storing the
143-
* resource.
144-
* @param FormView $view The form view for finding the applying
145-
* themes.
146-
* @param array $blockNameHierarchy The block hierarchy, with the most
147-
* specific block name at the end.
148-
* @param int $hierarchyLevel The level in the block hierarchy that
149-
* should be loaded.
142+
* @param string $cacheKey the cache key used for storing the
143+
* resource
144+
* @param FormView $view the form view for finding the applying
145+
* themes
146+
* @param array $blockNameHierarchy the block hierarchy, with the most
147+
* specific block name at the end
148+
* @param int $hierarchyLevel the level in the block hierarchy that
149+
* should be loaded
150150
*
151151
* @return bool True if the resource could be loaded, false otherwise
152152
*/

src/Symfony/Component/Form/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public function handleRequest($request = null)
371371
*
372372
* @return $this
373373
*
374-
* @throws Exception\AlreadySubmittedException If the button has already been submitted.
374+
* @throws Exception\AlreadySubmittedException if the button has already been submitted
375375
*/
376376
public function submit($submittedData, $clearMissing = true)
377377
{

src/Symfony/Component/Form/ButtonBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
5858
* @param string $name The name of the button
5959
* @param array $options The button's options
6060
*
61-
* @throws InvalidArgumentException If the name is empty.
61+
* @throws InvalidArgumentException if the name is empty
6262
*/
6363
public function __construct($name, array $options = array())
6464
{

src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ protected function flatten(array $choices, $value, &$choicesByValues, &$keysByVa
222222
* @param array $choices The choices
223223
* @param array|null $cache The cache for previously checked entries. Internal
224224
*
225-
* @return bool Returns true if the choices can be cast to strings and
226-
* false otherwise.
225+
* @return bool returns true if the choices can be cast to strings and
226+
* false otherwise
227227
*/
228228
private function castableToString(array $choices, array &$cache = array())
229229
{

src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class CachingFactoryDecorator implements ChoiceListFactoryInterface
4848
*
4949
* @return string The SHA-256 hash
5050
*
51-
* @internal Should not be used by user-land code.
51+
* @internal should not be used by user-land code
5252
*/
5353
public static function generateHash($value, $namespace = '')
5454
{

src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class ChoiceGroupView implements \IteratorAggregate
3636
* Creates a new choice group view.
3737
*
3838
* @param string $label The label of the group
39-
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views in the
40-
* group.
39+
* @param ChoiceGroupView[]|ChoiceView[] $choices the choice views in the
40+
* group
4141
*/
4242
public function __construct($label, array $choices = array())
4343
{

src/Symfony/Component/Form/ChoiceList/View/ChoiceListView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class ChoiceListView
4040
* Creates a new choice list view.
4141
*
4242
* @param ChoiceGroupView[]|ChoiceView[] $choices The choice views
43-
* @param ChoiceGroupView[]|ChoiceView[] $preferredChoices The preferred
44-
* choice views.
43+
* @param ChoiceGroupView[]|ChoiceView[] $preferredChoices the preferred
44+
* choice views
4545
*/
4646
public function __construct(array $choices = array(), array $preferredChoices = array())
4747
{

src/Symfony/Component/Form/DataMapperInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface DataMapperInterface
2222
* @param mixed $data Structured data
2323
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
2424
*
25-
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported.
25+
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
2626
*/
2727
public function mapDataToForms($data, $forms);
2828

@@ -32,7 +32,7 @@ public function mapDataToForms($data, $forms);
3232
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
3333
* @param mixed $data Structured data
3434
*
35-
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported.
35+
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
3636
*/
3737
public function mapFormsToData($forms, &$data);
3838
}

0 commit comments

Comments
 (0)
0