@@ -49,7 +49,7 @@ abstract class Constraint
4949 /**
5050 * Maps error codes to the names of their constants.
5151 */
52- protected static $ errorNames = array () ;
52+ protected static $ errorNames = [] ;
5353
5454 /**
5555 * Domain-specific data attached to a constraint.
@@ -105,7 +105,7 @@ public static function getErrorName($errorCode)
105105 */
106106 public function __construct ($ options = null )
107107 {
108- $ invalidOptions = array () ;
108+ $ invalidOptions = [] ;
109109 $ missingOptions = array_flip ((array ) $ this ->getRequiredOptions ());
110110 $ knownOptions = get_object_vars ($ this );
111111
@@ -173,7 +173,7 @@ public function __set($option, $value)
173173 return ;
174174 }
175175
176- throw new InvalidOptionsException (sprintf ('The option "%s" does not exist in constraint %s ' , $ option , \get_class ($ this )), array ( $ option) );
176+ throw new InvalidOptionsException (sprintf ('The option "%s" does not exist in constraint %s ' , $ option , \get_class ($ this )), [ $ option] );
177177 }
178178
179179 /**
@@ -194,12 +194,12 @@ public function __set($option, $value)
194194 public function __get ($ option )
195195 {
196196 if ('groups ' === $ option ) {
197- $ this ->groups = array ( self ::DEFAULT_GROUP ) ;
197+ $ this ->groups = [ self ::DEFAULT_GROUP ] ;
198198
199199 return $ this ->groups ;
200200 }
201201
202- throw new InvalidOptionsException (sprintf ('The option "%s" does not exist in constraint %s ' , $ option , \get_class ($ this )), array ( $ option) );
202+ throw new InvalidOptionsException (sprintf ('The option "%s" does not exist in constraint %s ' , $ option , \get_class ($ this )), [ $ option] );
203203 }
204204
205205 /**
@@ -248,7 +248,7 @@ public function getDefaultOption()
248248 */
249249 public function getRequiredOptions ()
250250 {
251- return array () ;
251+ return [] ;
252252 }
253253
254254 /**
0 commit comments