Skip to content

Commit c4616c2

Browse files
committed
Fix coding standards
1 parent cc65f3c commit c4616c2

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/Symfony/Component/Validator/Constraints/Json.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class Json extends Constraint
2323
{
2424
const NOT_JSON_ERROR = '0789c8ad-2d2b-49a4-8356-e2ce63998504';
2525

26-
protected static $errorNames = array(
26+
protected static $errorNames = [
2727
self::NOT_JSON_ERROR => 'NOT_JSON_ERROR',
28-
);
28+
];
2929

3030
public $message = 'This value should be valid JSON.';
3131
}

src/Symfony/Component/Validator/Tests/Constraints/JsonValidatorTest.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function testJsonIsValid($value)
3737
*/
3838
public function testInvalidValues($value)
3939
{
40-
$constraint = new Json(array(
40+
$constraint = new Json([
4141
'message' => 'myMessageTest',
42-
));
42+
]);
4343

4444
$this->validator->validate($value, $constraint);
4545

@@ -51,27 +51,27 @@ public function testInvalidValues($value)
5151

5252
public function getValidValues()
5353
{
54-
return array(
55-
array('{"planet":"earth", "country": "Morocco","city": "Rabat" ,"postcode" : 10160, "is_great": true,
56-
"img" : null, "area": 118.5, "foo": 15 }'),
57-
array(null),
58-
array(''),
59-
array('"null"'),
60-
array('null'),
61-
array('"string"'),
62-
array('1'),
63-
array('true'),
64-
array(1),
65-
);
54+
return [
55+
['{"planet":"earth", "country": "Morocco","city": "Rabat" ,"postcode" : 10160, "is_great": true,
56+
"img" : null, "area": 118.5, "foo": 15 }'],
57+
[null],
58+
[''],
59+
['"null"'],
60+
['null'],
61+
['"string"'],
62+
['1'],
63+
['true'],
64+
[1],
65+
];
6666
}
6767

6868
public function getInvalidValues()
6969
{
70-
return array(
71-
array('{"foo": 3 "bar": 4}'),
72-
array('{"foo": 3 ,"bar": 4'),
73-
array('{foo": 3, "bar": 4}'),
74-
array('foo'),
75-
);
70+
return [
71+
['{"foo": 3 "bar": 4}'],
72+
['{"foo": 3 ,"bar": 4'],
73+
['{foo": 3, "bar": 4}'],
74+
['foo'],
75+
];
7676
}
7777
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy