Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b07d5a7

Browse filesBrowse files
committed
Rebased against master
1 parent cce8803 commit b07d5a7
Copy full SHA for b07d5a7

File tree

3 files changed

+3
-24
lines changed
Filter options

3 files changed

+3
-24
lines changed

‎src/Symfony/Component/Validator/Constraints/Locale.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/Locale.php
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,5 @@ class Locale extends Constraint
2828
);
2929

3030
public $message = 'This value is not a valid locale.';
31-
3231
public $canonicalize = false;
33-
34-
/**
35-
* {@inheritdoc}
36-
*/
37-
public function __construct($options = null)
38-
{
39-
if (isset($options['canonicalize'])) {
40-
$this->canonicalize = $options['canonicalize'];
41-
}
42-
43-
parent::__construct($options);
44-
}
4532
}

‎src/Symfony/Component/Validator/Constraints/LocaleValidator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/LocaleValidator.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,4 @@ public function validate($value, Constraint $constraint)
5454
->addViolation();
5555
}
5656
}
57-
58-
/**
59-
* {@inheritdoc}
60-
*/
61-
public function getDefaultOption()
62-
{
63-
return 'canonicalize';
64-
}
6557
}

‎src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/LocaleValidatorTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getInvalidLocales()
9494
/**
9595
* @dataProvider getUncanonicalizedLocales
9696
*/
97-
public function testInvalidLocalesWithoutCanonicalization($locale)
97+
public function testInvalidLocalesWithoutCanonicalization(string $locale)
9898
{
9999
$constraint = new Locale(array(
100100
'message' => 'myMessage',
@@ -111,7 +111,7 @@ public function testInvalidLocalesWithoutCanonicalization($locale)
111111
/**
112112
* @dataProvider getUncanonicalizedLocales
113113
*/
114-
public function testValidLocalesWithCanonicalization($locale)
114+
public function testValidLocalesWithCanonicalization(string $locale)
115115
{
116116
$constraint = new Locale(array(
117117
'message' => 'myMessage',
@@ -123,7 +123,7 @@ public function testValidLocalesWithCanonicalization($locale)
123123
$this->assertNoViolation();
124124
}
125125

126-
public function getUncanonicalizedLocales()
126+
public function getUncanonicalizedLocales(): iterable
127127
{
128128
return array(
129129
array('en-US'),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.