Skip to content

Commit 08d6964

Browse files
Cleanup more @return annotations
1 parent 09a8d4a commit 08d6964

File tree

396 files changed

+1104
-1182
lines changed

Some content is hidden

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

396 files changed

+1104
-1182
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ protected function assertValidMappingConfiguration(array $mappingConfig, string
259259
/**
260260
* Detects what metadata driver to use for the supplied directory.
261261
*
262-
* @return string|null A metadata driver short name, if one can be detected
262+
* @return string|null
263263
*/
264264
protected function detectMetadataDriver(string $dir, ContainerBuilder $container)
265265
{
@@ -379,7 +379,7 @@ protected function loadCacheDriver(string $cacheName, string $objectManagerName,
379379
*
380380
* The manager called $autoMappedManager will map all bundles that are not mapped by other managers.
381381
*
382-
* @return array The modified version of $managerConfigs
382+
* @return array
383383
*/
384384
protected function fixManagersAutoMappings(array $managerConfigs, array $bundles)
385385
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function process(ContainerBuilder $container)
165165
* Get the service name of the metadata chain driver that the mappings
166166
* should be registered with.
167167
*
168-
* @return string The name of the chain driver service
168+
* @return string
169169
*
170170
* @throws InvalidArgumentException if non of the managerParameters has a
171171
* non-empty value
@@ -181,7 +181,7 @@ protected function getChainDriverServiceName(ContainerBuilder $container)
181181
* @param ContainerBuilder $container Passed on in case an extending class
182182
* needs access to the container
183183
*
184-
* @return Definition|Reference the metadata driver to add to all chain drivers
184+
* @return Definition|Reference
185185
*/
186186
protected function getDriver(ContainerBuilder $container)
187187
{
@@ -228,7 +228,7 @@ private function getManagerName(ContainerBuilder $container): string
228228
* This default implementation checks if the class has the enabledParameter
229229
* configured and if so if that parameter is present in the container.
230230
*
231-
* @return bool whether this compiler pass really should register the mappings
231+
* @return bool
232232
*/
233233
protected function enabled(ContainerBuilder $container)
234234
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ interface EntityLoaderInterface
2121
/**
2222
* Returns an array of entities that are valid choices in the corresponding choice list.
2323
*
24-
* @return array The entities
24+
* @return array
2525
*/
2626
public function getEntities();
2727

2828
/**
2929
* Returns an array of entities matching the given identifiers.
3030
*
31-
* @return array The entities
31+
* @return array
3232
*/
3333
public function getEntitiesByIds(string $identifier, array $values);
3434
}

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public function __construct(ObjectManager $om, ClassMetadata $classMetadata)
5959

6060
/**
6161
* Returns whether the class has a single-column ID.
62-
*
63-
* @return bool returns `true` if the class has a single-column ID and
64-
* `false` otherwise
6562
*/
6663
public function isSingleId(): bool
6764
{
@@ -70,9 +67,6 @@ public function isSingleId(): bool
7067

7168
/**
7269
* Returns whether the class has a single-column integer ID.
73-
*
74-
* @return bool returns `true` if the class has a single-column integer ID
75-
* and `false` otherwise
7670
*/
7771
public function isIntId(): bool
7872
{
@@ -84,7 +78,7 @@ public function isIntId(): bool
8478
*
8579
* This method assumes that the object has a single-column ID.
8680
*
87-
* @return string The ID value
81+
* @return string
8882
*/
8983
public function getIdValue(object $object = null)
9084
{
@@ -111,8 +105,6 @@ public function getIdValue(object $object = null)
111105
* Returns the name of the ID field.
112106
*
113107
* This method assumes that the object has a single-column ID.
114-
*
115-
* @return string The name of the ID field
116108
*/
117109
public function getIdField(): string
118110
{

src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CollectionToArrayTransformer implements DataTransformerInterface
2424
/**
2525
* Transforms a collection into an array.
2626
*
27-
* @return mixed An array of entities
27+
* @return mixed
2828
*
2929
* @throws TransformationFailedException
3030
*/
@@ -52,7 +52,7 @@ public function transform($collection)
5252
*
5353
* @param mixed $array An array of entities
5454
*
55-
* @return Collection A collection of entities
55+
* @return Collection
5656
*/
5757
public function reverseTransform($array)
5858
{

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ public static function createChoiceName(object $choice, $key, string $value): st
8686
* @param object $queryBuilder A query builder, type declaration is not present here as there
8787
* is no common base class for the different implementations
8888
*
89-
* @return array|null Array with important QueryBuilder parts or null if
90-
* they can't be determined
91-
*
9289
* @internal This method is public to be usable as callback. It should not
9390
* be used in user code.
9491
*/

src/Symfony/Bridge/Monolog/Tests/Handler/MailerHandlerTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ public function testHtmlContent()
9191
$handler->handle($this->getRecord(Logger::WARNING, 'message'));
9292
}
9393

94-
/**
95-
* @return array Record
96-
*/
97-
protected function getRecord($level = Logger::WARNING, $message = 'test', $context = [])
94+
protected function getRecord($level = Logger::WARNING, $message = 'test', $context = []): array
9895
{
9996
return [
10097
'message' => $message,
@@ -107,10 +104,7 @@ protected function getRecord($level = Logger::WARNING, $message = 'test', $conte
107104
];
108105
}
109106

110-
/**
111-
* @return array
112-
*/
113-
protected function getMultipleRecords()
107+
protected function getMultipleRecords(): array
114108
{
115109
return [
116110
$this->getRecord(Logger::DEBUG, 'debug message 1'),

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private function getPackage($path)
310310
}
311311

312312
/**
313-
* @return string[] an array of paths
313+
* @return string[]
314314
*/
315315
private static function getVendors()
316316
{

src/Symfony/Bridge/Twig/AppVariable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function getUser()
9090
/**
9191
* Returns the current request.
9292
*
93-
* @return Request|null The HTTP request object
93+
* @return Request|null
9494
*/
9595
public function getRequest()
9696
{
@@ -104,7 +104,7 @@ public function getRequest()
104104
/**
105105
* Returns the current session.
106106
*
107-
* @return Session|null The session
107+
* @return Session|null
108108
*/
109109
public function getSession()
110110
{
@@ -119,7 +119,7 @@ public function getSession()
119119
/**
120120
* Returns the current app environment.
121121
*
122-
* @return string The current environment string (e.g 'dev')
122+
* @return string
123123
*/
124124
public function getEnvironment()
125125
{
@@ -133,7 +133,7 @@ public function getEnvironment()
133133
/**
134134
* Returns the current app debug mode.
135135
*
136-
* @return bool The current debug mode
136+
* @return bool
137137
*/
138138
public function getDebug()
139139
{

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function formatFile(string $file, int $line, string $text = null): string
175175
/**
176176
* Returns the link for a given file/line pair.
177177
*
178-
* @return string|false A link or false
178+
* @return string|false
179179
*/
180180
public function getFileLink(string $file, int $line)
181181
{

0 commit comments

Comments
 (0)