Skip to content

Commit 84a6489

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: [2.3] CS And DocBlock Fixes [2.3] CS Fixes [FrameworkBundle] Fixed Translation loader and update translation command. [Console] remove « use » statement for PHP built-in exception classes. [SecurityBundle] adds unit tests suite for SecurityDataCollector class. Conflicts: src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php src/Symfony/Component/Form/Form.php src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php src/Symfony/Component/OptionsResolver/Options.php src/Symfony/Component/OptionsResolver/OptionsResolver.php src/Symfony/Component/Process/ProcessPipes.php src/Symfony/Component/Stopwatch/Stopwatch.php src/Symfony/Component/Translation/Loader/XliffFileLoader.php src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
2 parents e548047 + 90bf49a commit 84a6489

30 files changed

+56
-44
lines changed

Constraint.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,22 @@
3434
abstract class Constraint
3535
{
3636
/**
37-
* The name of the group given to all constraints with no explicit group
37+
* The name of the group given to all constraints with no explicit group.
38+
*
3839
* @var string
3940
*/
4041
const DEFAULT_GROUP = 'Default';
4142

4243
/**
43-
* Marks a constraint that can be put onto classes
44+
* Marks a constraint that can be put onto classes.
45+
*
4446
* @var string
4547
*/
4648
const CLASS_CONSTRAINT = 'class';
4749

4850
/**
49-
* Marks a constraint that can be put onto properties
51+
* Marks a constraint that can be put onto properties.
52+
*
5053
* @var string
5154
*/
5255
const PROPERTY_CONSTRAINT = 'property';
@@ -221,7 +224,7 @@ public function __get($option)
221224
}
222225

223226
/**
224-
* Adds the given group if this constraint is in the Default group
227+
* Adds the given group if this constraint is in the Default group.
225228
*
226229
* @param string $group
227230
*
@@ -235,11 +238,12 @@ public function addImplicitGroupName($group)
235238
}
236239

237240
/**
238-
* Returns the name of the default option
241+
* Returns the name of the default option.
239242
*
240243
* Override this method to define a default option.
241244
*
242245
* @return string
246+
*
243247
* @see __construct()
244248
*
245249
* @api
@@ -249,11 +253,12 @@ public function getDefaultOption()
249253
}
250254

251255
/**
252-
* Returns the name of the required options
256+
* Returns the name of the required options.
253257
*
254258
* Override this method if you want to define required options.
255259
*
256260
* @return array
261+
*
257262
* @see __construct()
258263
*
259264
* @api
@@ -264,7 +269,7 @@ public function getRequiredOptions()
264269
}
265270

266271
/**
267-
* Returns the name of the class that validates this constraint
272+
* Returns the name of the class that validates this constraint.
268273
*
269274
* By default, this is the fully qualified name of the constraint class
270275
* suffixed with "Validator". You can override this method to change that
@@ -281,7 +286,7 @@ public function validatedBy()
281286

282287
/**
283288
* Returns whether the constraint can be put onto classes, properties or
284-
* both
289+
* both.
285290
*
286291
* This method should return one or more of the constants
287292
* Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT.

ConstraintValidator.php

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

1818
/**
19-
* Base class for constraint validators
19+
* Base class for constraint validators.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
2222
*

Constraints/AbstractComparisonValidator.php

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

6565
/**
66-
* Compares the two given values to find if their relationship is valid
66+
* Compares the two given values to find if their relationship is valid.
6767
*
6868
* @param mixed $value1 The first value to compare
6969
* @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\UnexpectedTypeException;
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CardSchemeValidator extends ConstraintValidator
5050
),
5151
/**
5252
* Discover card numbers begin with 6011, 622126 through 622925, 644 through 649 or 65.
53-
* All have 16 digits
53+
* All have 16 digits.
5454
*/
5555
'DISCOVER' => array(
5656
'/^6011[0-9]{12}$/',
@@ -59,7 +59,7 @@ class CardSchemeValidator extends ConstraintValidator
5959
'/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/',
6060
),
6161
/**
62-
* InstaPayment cards begin with 637 through 639 and have 16 digits
62+
* InstaPayment cards begin with 637 through 639 and have 16 digits.
6363
*/
6464
'INSTAPAYMENT' => array(
6565
'/^63[7-9][0-9]{13}$/',
@@ -72,14 +72,14 @@ class CardSchemeValidator extends ConstraintValidator
7272
'/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/',
7373
),
7474
/**
75-
* Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits
75+
* Laser cards begin with either 6304, 6706, 6709 or 6771 and have between 16 and 19 digits.
7676
*/
7777
'LASER' => array(
7878
'/^(6304|670[69]|6771)[0-9]{12,15}$/',
7979
),
8080
/**
8181
* Maestro cards begin with either 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 or 0604
82-
* They have between 12 and 19 digits
82+
* They have between 12 and 19 digits.
8383
*/
8484
'MAESTRO' => array(
8585
'/^(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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable
6060
{
6161
/**
62-
* The groups in the sequence
62+
* The groups in the sequence.
6363
*
6464
* @var string[]|GroupSequence[]
6565
*/

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
@@ -17,7 +17,7 @@
1717

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

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\Exception\ConstraintDefinitionException;
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface
111111
private $reflClass;
112112

113113
/**
114-
* Constructs a metadata for the given class
114+
* Constructs a metadata for the given class.
115115
*
116116
* @param string $class
117117
*/
@@ -195,7 +195,7 @@ public function getClassName()
195195
}
196196

197197
/**
198-
* Returns the name of the default group for this class
198+
* Returns the name of the default group for this class.
199199
*
200200
* For each class, the group "Default" is an alias for the group
201201
* "<ClassName>", where <ClassName> is the non-namespaced name of the

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 = array();

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
*

Mapping/Loader/XmlFilesLoader.php

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

1414
/**
15-
* Loads multiple xml mapping files
15+
* Loads multiple xml mapping files.
1616
*
1717
* @author Bulat Shakirzyanov <[email protected]>
1818
*

Mapping/Loader/YamlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class YamlFileLoader extends FileLoader
1919
private $yamlParser;
2020

2121
/**
22-
* An array of YAML class descriptions
22+
* An array of YAML class descriptions.
2323
*
2424
* @var array
2525
*/
@@ -110,7 +110,7 @@ public function loadClassMetadata(ClassMetadata $metadata)
110110
}
111111

112112
/**
113-
* Parses a collection of YAML nodes
113+
* Parses a collection of YAML nodes.
114114
*
115115
* @param array $nodes The YAML nodes
116116
*

Mapping/Loader/YamlFilesLoader.php

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

1414
/**
15-
* Loads multiple yaml mapping files
15+
* Loads multiple yaml mapping files.
1616
*
1717
* @author Bulat Shakirzyanov <[email protected]>
1818
*

Mapping/MemberMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function isPublic($objectOrClassName)
157157
}
158158

159159
/**
160-
* Returns whether this member is protected
160+
* Returns whether this member is protected.
161161
*
162162
* @param object|string $objectOrClassName The object or the class name
163163
*

0 commit comments

Comments
 (0)