File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 31
31
}
32
32
},
33
33
"scripts" : {
34
+ "actions" : " composer test && composer analyse && composer check-style" ,
34
35
"test" : " phpunit" ,
35
36
"analyse" : " phpstan analyse src tests --level=9" ,
36
37
"check-style" : " phpcs -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests" ,
Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ class CorsService
63
63
* @param CorsInputOptions $options
64
64
*/
65
65
public function __construct (array $ options = [])
66
+ {
67
+ if ($ options ) {
68
+ $ this ->setOptions ($ options );
69
+ }
70
+ }
71
+
72
+ /**
73
+ * @param CorsInputOptions $options
74
+ */
75
+ public function setOptions (array $ options ): void
66
76
{
67
77
$ this ->allowedOrigins = $ options ['allowedOrigins ' ] ?? $ options ['allowed_origins ' ] ?? $ this ->allowedOrigins ;
68
78
$ this ->allowedOriginsPatterns =
You can’t perform that action at this time.
0 commit comments