Skip to content

Commit 1cb494e

Browse files
GrahamCampbellfabpot
authored andcommitted
[2.3] CS And DocBlock Fixes
1 parent a019661 commit 1cb494e

31 files changed

+75
-59
lines changed

Constraint.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,22 @@
3131
abstract class Constraint
3232
{
3333
/**
34-
* The name of the group given to all constraints with no explicit group
34+
* The name of the group given to all constraints with no explicit group.
35+
*
3536
* @var string
3637
*/
3738
const DEFAULT_GROUP = 'Default';
3839

3940
/**
40-
* Marks a constraint that can be put onto classes
41+
* Marks a constraint that can be put onto classes.
42+
*
4143
* @var string
4244
*/
4345
const CLASS_CONSTRAINT = 'class';
4446

4547
/**
46-
* Marks a constraint that can be put onto properties
48+
* Marks a constraint that can be put onto properties.
49+
*
4750
* @var string
4851
*/
4952
const PROPERTY_CONSTRAINT = 'property';
@@ -143,7 +146,7 @@ public function __set($option, $value)
143146
}
144147

145148
/**
146-
* Adds the given group if this constraint is in the Default group
149+
* Adds the given group if this constraint is in the Default group.
147150
*
148151
* @param string $group
149152
*
@@ -157,11 +160,12 @@ public function addImplicitGroupName($group)
157160
}
158161

159162
/**
160-
* Returns the name of the default option
163+
* Returns the name of the default option.
161164
*
162165
* Override this method to define a default option.
163166
*
164167
* @return string
168+
*
165169
* @see __construct()
166170
*
167171
* @api
@@ -171,11 +175,12 @@ public function getDefaultOption()
171175
}
172176

173177
/**
174-
* Returns the name of the required options
178+
* Returns the name of the required options.
175179
*
176180
* Override this method if you want to define required options.
177181
*
178182
* @return array
183+
*
179184
* @see __construct()
180185
*
181186
* @api
@@ -186,7 +191,7 @@ public function getRequiredOptions()
186191
}
187192

188193
/**
189-
* Returns the name of the class that validates this constraint
194+
* Returns the name of the class that validates this constraint.
190195
*
191196
* By default, this is the fully qualified name of the constraint class
192197
* suffixed with "Validator". You can override this method to change that
@@ -203,7 +208,7 @@ public function validatedBy()
203208

204209
/**
205210
* Returns whether the constraint can be put onto classes, properties or
206-
* both
211+
* both.
207212
*
208213
* This method should return one or more of the constants
209214
* Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT.

ConstraintValidator.php

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

1414
/**
15-
* Base class for constraint validators
15+
* Base class for constraint validators.
1616
*
1717
* @author Bernhard Schussek <[email protected]>
1818
*

Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function validate($value, Constraint $constraint)
4040
}
4141

4242
/**
43-
* Compares the two given values to find if their relationship is valid
43+
* Compares the two given values to find if their relationship is valid.
4444
*
4545
* @param mixed $value1 The first value to compare
4646
* @param mixed $value2 The second value to compare

Constraints/CallbackValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
1818

1919
/**
20-
* Validator for Callback constraint
20+
* Validator for Callback constraint.
2121
*
2222
* @author Bernhard Schussek <[email protected]>
2323
*

Constraints/CardSchemeValidator.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*
2020
* @see http://en.wikipedia.org/wiki/Bank_card_number
2121
* @see http://www.regular-expressions.info/creditcard.html
22+
*
2223
* @author Tim Nagel <[email protected]>
2324
*/
2425
class CardSchemeValidator extends ConstraintValidator
@@ -47,7 +48,7 @@ class CardSchemeValidator extends ConstraintValidator
4748
),
4849
/**
4950
* Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65.
50-
* All have 16 digits
51+
* All have 16 digits.
5152
*/
5253
'DISCOVER' => array(
5354
'/^6011[0-9]{12}$/',
@@ -56,7 +57,7 @@ class CardSchemeValidator extends ConstraintValidator
5657
'/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/',
5758
),
5859
/**
59-
* InstaPayment cards begin with 637 through 639 and have 16 digits
60+
* InstaPayment cards begin with 637 through 639 and have 16 digits.
6061
*/
6162
'INSTAPAYMENT' => array(
6263
'/^63[7-9][0-9]{13}$/',
@@ -69,14 +70,14 @@ class CardSchemeValidator extends ConstraintValidator
6970
'/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/',
7071
),
7172
/**
72-
* Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits
73+
* Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits.
7374
*/
7475
'LASER' => array(
7576
'/^(6304|670[69]|6771)[0-9]{12,15}$/',
7677
),
7778
/**
7879
* Maestro cards begin with either 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 or 0604
79-
* They have between 12 and 19 digits
80+
* They have between 12 and 19 digits.
8081
*/
8182
'MAESTRO' => array(
8283
'/^(5018|5020|5038|6304|6759|6761|676[23]|0604)[0-9]{8,15}$/',

Constraints/CountryValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1818

1919
/**
20-
* Validates whether a value is a valid country code
20+
* Validates whether a value is a valid country code.
2121
*
2222
* @author Bernhard Schussek <[email protected]>
2323
*

Constraints/CurrencyValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1818

1919
/**
20-
* Validates whether a value is a valid currency
20+
* Validates whether a value is a valid currency.
2121
*
2222
* @author Miha Vrhovnik <[email protected]>
2323
*

Constraints/GroupSequence.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Validator\Constraints;
1313

1414
/**
15-
* Annotation for group sequences
15+
* Annotation for group sequences.
1616
*
1717
* @Annotation
1818
* @Target({"CLASS", "ANNOTATION"})
@@ -24,7 +24,8 @@
2424
class GroupSequence
2525
{
2626
/**
27-
* The members of the sequence
27+
* The members of the sequence.
28+
*
2829
* @var array
2930
*/
3031
public $groups;

Constraints/GroupSequenceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Validator\Constraints;
1313

1414
/**
15-
* Annotation to define a group sequence provider
15+
* Annotation to define a group sequence provider.
1616
*
1717
* @Annotation
1818
* @Target({"CLASS", "ANNOTATION"})

Constraints/IbanValidator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @author Manuel Reinhard <[email protected]>
2020
* @author Michael Schummel
2121
* @author Bernhard Schussek <[email protected]>
22+
*
2223
* @link http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/
2324
*/
2425
class IbanValidator extends ConstraintValidator

Constraints/ImageValidator.php

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

1717
/**
1818
* Validates whether a value is a valid image file and is valid
19-
* against minWidth, maxWidth, minHeight and maxHeight constraints
19+
* against minWidth, maxWidth, minHeight and maxHeight constraints.
2020
*
2121
* @author Benjamin Dulau <[email protected]>
2222
*/

Constraints/Ip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Validator\Constraint;
1616

1717
/**
18-
* Validates that a value is a valid IP address
18+
* Validates that a value is a valid IP address.
1919
*
2020
* @Annotation
2121
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})

Constraints/IpValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1717

1818
/**
19-
* Validates whether a value is a valid IP address
19+
* Validates whether a value is a valid IP address.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
2222
* @author Joseph Bielawski <[email protected]>

Constraints/LanguageValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1818

1919
/**
20-
* Validates whether a value is a valid language code
20+
* Validates whether a value is a valid language code.
2121
*
2222
* @author Bernhard Schussek <[email protected]>
2323
*

Constraints/LocaleValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1818

1919
/**
20-
* Validates whether a value is a valid locale code
20+
* Validates whether a value is a valid locale code.
2121
*
2222
* @author Bernhard Schussek <[email protected]>
2323
*

Constraints/LuhnValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1717

1818
/**
19-
* Validates a PAN using the LUHN Algorithm
19+
* Validates a PAN using the LUHN Algorithm.
2020
*
2121
* For a list of example card numbers that are used to test this
2222
* class, please see the LuhnValidatorTest class.
2323
*
2424
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
25+
*
2526
* @author Tim Nagel <[email protected]>
2627
* @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/
2728
* @author Bernhard Schussek <[email protected]>

Constraints/Regex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function getRequiredOptions()
4747
/**
4848
* Converts the htmlPattern to a suitable format for HTML5 pattern.
4949
* Example: /^[a-z]+$/ would be converted to [a-z]+
50-
* However, if options are specified, it cannot be converted
50+
* However, if options are specified, it cannot be converted.
5151
*
5252
* Pattern is also ignored if match=false since the pattern should
5353
* then be reversed before application.

Constraints/RegexValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1717

1818
/**
19-
* Validates whether a value match or not given regexp pattern
19+
* Validates whether a value match or not given regexp pattern.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
2222
* @author Joseph Bielawski <[email protected]>

Mapping/Cache/CacheInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
use Symfony\Component\Validator\Mapping\ClassMetadata;
1515

1616
/**
17-
* Persists ClassMetadata instances in a cache
17+
* Persists ClassMetadata instances in a cache.
1818
*
1919
* @author Bernhard Schussek <[email protected]>
2020
*/
2121
interface CacheInterface
2222
{
2323
/**
24-
* Returns whether metadata for the given class exists in the cache
24+
* Returns whether metadata for the given class exists in the cache.
2525
*
2626
* @param string $class
2727
*/
2828
public function has($class);
2929

3030
/**
31-
* Returns the metadata for the given class from the cache
31+
* Returns the metadata for the given class from the cache.
3232
*
3333
* @param string $class Class Name
3434
*
@@ -37,7 +37,7 @@ public function has($class);
3737
public function read($class);
3838

3939
/**
40-
* Stores a class metadata in the cache
40+
* Stores a class metadata in the cache.
4141
*
4242
* @param ClassMetadata $metadata A Class Metadata
4343
*/

Mapping/ClassMetadata.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ClassMetadata extends ElementMetadata implements MetadataInterface, ClassB
6868
private $reflClass;
6969

7070
/**
71-
* Constructs a metadata for the given class
71+
* Constructs a metadata for the given class.
7272
*
7373
* @param string $class
7474
*/
@@ -118,7 +118,7 @@ public function accept(ValidationVisitorInterface $visitor, $value, $group, $pro
118118
}
119119

120120
/**
121-
* Returns the properties to be serialized
121+
* Returns the properties to be serialized.
122122
*
123123
* @return array
124124
*/
@@ -136,7 +136,7 @@ public function __sleep()
136136
}
137137

138138
/**
139-
* Returns the fully qualified name of the class
139+
* Returns the fully qualified name of the class.
140140
*
141141
* @return string The fully qualified class name
142142
*/
@@ -146,7 +146,7 @@ public function getClassName()
146146
}
147147

148148
/**
149-
* Returns the name of the default group for this class
149+
* Returns the name of the default group for this class.
150150
*
151151
* For each class, the group "Default" is an alias for the group
152152
* "<ClassName>", where <ClassName> is the non-namespaced name of the

Mapping/ClassMetadataFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
class ClassMetadataFactory implements MetadataFactoryInterface
2525
{
2626
/**
27-
* The loader for loading the class metadata
27+
* The loader for loading the class metadata.
28+
*
2829
* @var LoaderInterface
2930
*/
3031
protected $loader;
3132

3233
/**
33-
* The cache for caching class metadata
34+
* The cache for caching class metadata.
35+
*
3436
* @var CacheInterface
3537
*/
3638
protected $cache;

Mapping/Loader/AbstractLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
abstract class AbstractLoader implements LoaderInterface
1818
{
1919
/**
20-
* Contains all known namespaces indexed by their prefix
20+
* Contains all known namespaces indexed by their prefix.
21+
*
2122
* @var array
2223
*/
2324
protected $namespaces;

Mapping/Loader/LoaderChain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Validator\Mapping\ClassMetadata;
1616

1717
/**
18-
* Calls multiple LoaderInterface instances in a chain
18+
* Calls multiple LoaderInterface instances in a chain.
1919
*
2020
* This class accepts multiple instances of LoaderInterface to be passed to the
2121
* constructor. When loadClassMetadata() is called, the same method is called
@@ -29,7 +29,7 @@ class LoaderChain implements LoaderInterface
2929
protected $loaders;
3030

3131
/**
32-
* Accepts a list of LoaderInterface instances
32+
* Accepts a list of LoaderInterface instances.
3333
*
3434
* @param LoaderInterface[] $loaders An array of LoaderInterface instances
3535
*

0 commit comments

Comments
 (0)