Skip to content

Commit 8b1cebb

Browse files
Cleanup @return annotations
1 parent 3203d3b commit 8b1cebb

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

ConstraintViolationList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function offsetUnset($offset)
184184
*
185185
* @param string|string[] $codes The codes to find
186186
*
187-
* @return static new instance which contains only specific errors
187+
* @return static
188188
*/
189189
public function findByCodes($codes)
190190
{

Mapping/ClassMetadataInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public function hasPropertyMetadata(string $property);
9191
*
9292
* @param string $property The property name
9393
*
94-
* @return PropertyMetadataInterface[] A list of metadata instances. Empty if
95-
* no metadata exists for the property.
94+
* @return PropertyMetadataInterface[]
9695
*/
9796
public function getPropertyMetadata(string $property);
9897

Mapping/Loader/XmlFileLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Validator\Mapping\Loader;
1313

1414
use Symfony\Component\Config\Util\XmlUtils;
15+
use Symfony\Component\Validator\Constraint;
1516
use Symfony\Component\Validator\Exception\MappingException;
1617
use Symfony\Component\Validator\Mapping\ClassMetadata;
1718

@@ -68,7 +69,7 @@ public function getMappedClasses()
6869
*
6970
* @param \SimpleXMLElement $nodes The XML nodes
7071
*
71-
* @return array The Constraint instances
72+
* @return Constraint[]
7273
*/
7374
protected function parseConstraints(\SimpleXMLElement $nodes)
7475
{

Mapping/Loader/YamlFileLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Validator\Mapping\Loader;
1313

14+
use Symfony\Component\Validator\Constraint;
1415
use Symfony\Component\Validator\Mapping\ClassMetadata;
1516
use Symfony\Component\Yaml\Exception\ParseException;
1617
use Symfony\Component\Yaml\Parser as YamlParser;
@@ -76,7 +77,7 @@ public function getMappedClasses()
7677
*
7778
* @param array $nodes The YAML nodes
7879
*
79-
* @return array An array of values or Constraint instances
80+
* @return array<array|scalar|Constraint>
8081
*/
8182
protected function parseNodes(array $nodes)
8283
{

Mapping/MemberMetadata.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function isPrivate($objectOrClassName)
158158
*
159159
* @param object|string $objectOrClassName The object or the class name
160160
*
161-
* @return \ReflectionMethod|\ReflectionProperty The reflection instance
161+
* @return \ReflectionMethod|\ReflectionProperty
162162
*/
163163
public function getReflectionMember($objectOrClassName)
164164
{
@@ -177,7 +177,7 @@ public function getReflectionMember($objectOrClassName)
177177
*
178178
* @param object|string $objectOrClassName The object or the class name
179179
*
180-
* @return \ReflectionMethod|\ReflectionProperty The reflection instance
180+
* @return \ReflectionMethod|\ReflectionProperty
181181
*/
182182
abstract protected function newReflectionMember($objectOrClassName);
183183

Mapping/MetadataInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getTraversalStrategy();
5151
/**
5252
* Returns all constraints of this element.
5353
*
54-
* @return Constraint[] A list of Constraint instances
54+
* @return Constraint[]
5555
*/
5656
public function getConstraints();
5757

0 commit comments

Comments
 (0)