@@ -39,7 +39,7 @@ public function testEmptyStringIsValid()
39
39
40
40
public function testValidComparisonToPropertyPath ()
41
41
{
42
- $ constraint = new Bic (array ( 'ibanPropertyPath ' => 'value ' ) );
42
+ $ constraint = new Bic ([ 'ibanPropertyPath ' => 'value ' ] );
43
43
44
44
$ object = new BicComparisonTestClass ('FR14 2004 1010 0505 0001 3M02 606 ' );
45
45
@@ -52,9 +52,9 @@ public function testValidComparisonToPropertyPath()
52
52
53
53
public function testValidComparisonToPropertyPathOnArray ()
54
54
{
55
- $ constraint = new Bic (array ( 'ibanPropertyPath ' => '[root][value] ' ) );
55
+ $ constraint = new Bic ([ 'ibanPropertyPath ' => '[root][value] ' ] );
56
56
57
- $ this ->setObject (array ( 'root ' => array ( 'value ' => 'FR14 2004 1010 0505 0001 3M02 606 ' )) );
57
+ $ this ->setObject ([ 'root ' => [ 'value ' => 'FR14 2004 1010 0505 0001 3M02 606 ' ]] );
58
58
59
59
$ this ->validator ->validate ('SOGEFRPP ' , $ constraint );
60
60
@@ -63,7 +63,7 @@ public function testValidComparisonToPropertyPathOnArray()
63
63
64
64
public function testInvalidComparisonToPropertyPath ()
65
65
{
66
- $ constraint = new Bic (array ( 'ibanPropertyPath ' => 'value ' ) );
66
+ $ constraint = new Bic ([ 'ibanPropertyPath ' => 'value ' ] );
67
67
$ constraint ->ibanMessage = 'Constraint Message ' ;
68
68
69
69
$ object = new BicComparisonTestClass ('FR14 2004 1010 0505 0001 3M02 606 ' );
@@ -81,7 +81,7 @@ public function testInvalidComparisonToPropertyPath()
81
81
82
82
public function testValidComparisonToValue ()
83
83
{
84
- $ constraint = new Bic (array ( 'iban ' => 'FR14 2004 1010 0505 0001 3M02 606 ' ) );
84
+ $ constraint = new Bic ([ 'iban ' => 'FR14 2004 1010 0505 0001 3M02 606 ' ] );
85
85
$ constraint ->ibanMessage = 'Constraint Message ' ;
86
86
87
87
$ this ->validator ->validate ('SOGEFRPP ' , $ constraint );
@@ -91,7 +91,7 @@ public function testValidComparisonToValue()
91
91
92
92
public function testInvalidComparisonToValue ()
93
93
{
94
- $ constraint = new Bic (array ( 'iban ' => 'FR14 2004 1010 0505 0001 3M02 606 ' ) );
94
+ $ constraint = new Bic ([ 'iban ' => 'FR14 2004 1010 0505 0001 3M02 606 ' ] );
95
95
$ constraint ->ibanMessage = 'Constraint Message ' ;
96
96
97
97
$ this ->validator ->validate ('UNCRIT2B912 ' , $ constraint );
@@ -105,7 +105,7 @@ public function testInvalidComparisonToValue()
105
105
106
106
public function testNoViolationOnNullObjectWithPropertyPath ()
107
107
{
108
- $ constraint = new Bic (array ( 'ibanPropertyPath ' => 'propertyPath ' ) );
108
+ $ constraint = new Bic ([ 'ibanPropertyPath ' => 'propertyPath ' ] );
109
109
110
110
$ this ->setObject (null );
111
111
@@ -120,15 +120,15 @@ public function testNoViolationOnNullObjectWithPropertyPath()
120
120
*/
121
121
public function testThrowsConstraintExceptionIfBothValueAndPropertyPath ()
122
122
{
123
- new Bic (array (
123
+ new Bic ([
124
124
'iban ' => 'value ' ,
125
125
'ibanPropertyPath ' => 'propertyPath ' ,
126
- ) );
126
+ ] );
127
127
}
128
128
129
129
public function testInvalidValuePath ()
130
130
{
131
- $ constraint = new Bic (array ( 'ibanPropertyPath ' => 'foo ' ) );
131
+ $ constraint = new Bic ([ 'ibanPropertyPath ' => 'foo ' ] );
132
132
133
133
if (method_exists ($ this , 'expectException ' )) {
134
134
$ this ->expectException (ConstraintDefinitionException::class);
@@ -230,7 +230,7 @@ public function getInvalidBics()
230
230
*/
231
231
public function testValidBicSpecialCases (string $ bic , string $ iban )
232
232
{
233
- $ constraint = new Bic (array ( 'iban ' => $ iban) );
233
+ $ constraint = new Bic ([ 'iban ' => $ iban] );
234
234
$ this ->validator ->validate ($ bic , $ constraint );
235
235
236
236
$ this ->assertNoViolation ();
@@ -239,22 +239,22 @@ public function testValidBicSpecialCases(string $bic, string $iban)
239
239
public function getValidBicSpecialCases ()
240
240
{
241
241
// FR related special cases
242
- yield array ( 'BNPAGFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
243
- yield array ( 'BNPAPFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
244
- yield array ( 'BNPATFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
245
- yield array ( 'BNPAGPGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
246
- yield array ( 'BNPAMQGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
247
- yield array ( 'BNPAYTGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
248
- yield array ( 'BNPANCGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
249
- yield array ( 'BNPAREGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
250
- yield array ( 'BNPAPMGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
251
- yield array ( 'BNPAWFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ) ;
242
+ yield [ 'BNPAGFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
243
+ yield [ 'BNPAPFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
244
+ yield [ 'BNPATFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
245
+ yield [ 'BNPAGPGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
246
+ yield [ 'BNPAMQGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
247
+ yield [ 'BNPAYTGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
248
+ yield [ 'BNPANCGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
249
+ yield [ 'BNPAREGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
250
+ yield [ 'BNPAPMGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
251
+ yield [ 'BNPAWFGX ' , 'FR14 2004 1010 0505 0001 3M02 606 ' ] ;
252
252
253
253
// GB related special cases
254
- yield array ( 'BARCJESA ' , 'GB12 CPBK 0892 9965 0449 911 ' ) ;
255
- yield array ( 'BARCIMSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ) ;
256
- yield array ( 'BARCGGSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ) ;
257
- yield array ( 'BARCVGSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ) ;
254
+ yield [ 'BARCJESA ' , 'GB12 CPBK 0892 9965 0449 911 ' ] ;
255
+ yield [ 'BARCIMSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ] ;
256
+ yield [ 'BARCGGSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ] ;
257
+ yield [ 'BARCVGSA ' , 'GB12 CPBK 0892 9965 0449 911 ' ] ;
258
258
}
259
259
}
260
260
0 commit comments