@@ -24,12 +24,12 @@ class Collection extends Composite
24
24
const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8 ' ;
25
25
const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9 ' ;
26
26
27
- protected static $ errorNames = array (
27
+ protected static $ errorNames = [
28
28
self ::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR ' ,
29
29
self ::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR ' ,
30
- ) ;
30
+ ] ;
31
31
32
- public $ fields = array () ;
32
+ public $ fields = [] ;
33
33
public $ allowExtraFields = false ;
34
34
public $ allowMissingFields = false ;
35
35
public $ extraFieldsMessage = 'This field was not expected. ' ;
@@ -42,8 +42,8 @@ public function __construct($options = null)
42
42
{
43
43
// no known options set? $options is the fields array
44
44
if (\is_array ($ options )
45
- && !array_intersect (array_keys ($ options ), array ( 'groups ' , 'fields ' , 'allowExtraFields ' , 'allowMissingFields ' , 'extraFieldsMessage ' , 'missingFieldsMessage ' ) )) {
46
- $ options = array ( 'fields ' => $ options) ;
45
+ && !array_intersect (array_keys ($ options ), [ 'groups ' , 'fields ' , 'allowExtraFields ' , 'allowMissingFields ' , 'extraFieldsMessage ' , 'missingFieldsMessage ' ] )) {
46
+ $ options = [ 'fields ' => $ options] ;
47
47
}
48
48
49
49
parent ::__construct ($ options );
@@ -75,7 +75,7 @@ protected function initializeNestedConstraints()
75
75
76
76
public function getRequiredOptions ()
77
77
{
78
- return array ( 'fields ' ) ;
78
+ return [ 'fields ' ] ;
79
79
}
80
80
81
81
protected function getCompositeOption ()
0 commit comments