File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,22 @@ class CorsService
1818{
1919 private $ options ;
2020
21- public function __construct (array $ options = array () )
21+ public function __construct (array $ options )
2222 {
2323 $ this ->options = $ this ->normalizeOptions ($ options );
2424 }
2525
26- private function normalizeOptions (array $ options = array () ): array
26+ private function normalizeOptions (array $ options ): array
2727 {
28- $ options += array (
29- 'allowedOrigins ' => array () ,
30- 'allowedOriginsPatterns ' => array () ,
28+ $ options += [
29+ 'allowedOrigins ' => [] ,
30+ 'allowedOriginsPatterns ' => [] ,
3131 'supportsCredentials ' => false ,
32- 'allowedHeaders ' => array () ,
33- 'exposedHeaders ' => array () ,
34- 'allowedMethods ' => array () ,
32+ 'allowedHeaders ' => [] ,
33+ 'exposedHeaders ' => [] ,
34+ 'allowedMethods ' => [] ,
3535 'maxAge ' => 0 ,
36- ) ;
36+ ] ;
3737
3838 // normalize array('*') to true
3939 if (in_array ('* ' , $ options ['allowedOrigins ' ])) {
You can’t perform that action at this time.
0 commit comments