You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 3.4:
fixed CS
fixed short array CS in comments
fixed CS in ExpressionLanguage fixtures
fixed CS in generated files
fixed CS on generated container files
fixed CS on Form PHP templates
fixed CS on YAML fixtures
fixed fixtures
switched array() to []
Copy file name to clipboardExpand all lines: OptionsResolver.php
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -29,51 +29,51 @@ class OptionsResolver implements Options
29
29
/**
30
30
* The names of all defined options.
31
31
*/
32
-
private$defined = array();
32
+
private$defined = [];
33
33
34
34
/**
35
35
* The default option values.
36
36
*/
37
-
private$defaults = array();
37
+
private$defaults = [];
38
38
39
39
/**
40
40
* The names of required options.
41
41
*/
42
-
private$required = array();
42
+
private$required = [];
43
43
44
44
/**
45
45
* The resolved option values.
46
46
*/
47
-
private$resolved = array();
47
+
private$resolved = [];
48
48
49
49
/**
50
50
* A list of normalizer closures.
51
51
*
52
52
* @var \Closure[]
53
53
*/
54
-
private$normalizers = array();
54
+
private$normalizers = [];
55
55
56
56
/**
57
57
* A list of accepted values for each option.
58
58
*/
59
-
private$allowedValues = array();
59
+
private$allowedValues = [];
60
60
61
61
/**
62
62
* A list of accepted types for each option.
63
63
*/
64
-
private$allowedTypes = array();
64
+
private$allowedTypes = [];
65
65
66
66
/**
67
67
* A list of closures for evaluating lazy options.
68
68
*/
69
-
private$lazy = array();
69
+
private$lazy = [];
70
70
71
71
/**
72
72
* A list of lazy options whose closure is currently being called.
73
73
*
74
74
* This list helps detecting circular dependencies between lazy options.
75
75
*/
76
-
private$calling = array();
76
+
private$calling = [];
77
77
78
78
/**
79
79
* Whether the instance is locked for reading.
@@ -85,11 +85,11 @@ class OptionsResolver implements Options
85
85
*/
86
86
private$locked = false;
87
87
88
-
privatestatic$typeAliases = array(
88
+
privatestatic$typeAliases = [
89
89
'boolean' => 'bool',
90
90
'integer' => 'int',
91
91
'double' => 'float',
92
-
);
92
+
];
93
93
94
94
/**
95
95
* Sets the default value of a given option.
@@ -154,7 +154,7 @@ public function setDefault($option, $value)
154
154
155
155
// Ignore previous lazy options if the closure has no second parameter
156
156
if (!isset($this->lazy[$option]) || !isset($params[1])) {
157
-
$this->lazy[$option] = array();
157
+
$this->lazy[$option] = [];
158
158
}
159
159
160
160
// Store closure for later evaluation
@@ -423,7 +423,7 @@ public function setAllowedValues($option, $allowedValues)
423
423
thrownewUndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined))));
0 commit comments