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 3131 }
3232 },
3333 "scripts" : {
34+ "actions" : " composer test && composer analyse && composer check-style" ,
3435 "test" : " phpunit" ,
3536 "analyse" : " phpstan analyse src tests --level=9" ,
3637 "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
6363 * @param CorsInputOptions $options
6464 */
6565 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
6676 {
6777 $ this ->allowedOrigins = $ options ['allowedOrigins ' ] ?? $ options ['allowed_origins ' ] ?? $ this ->allowedOrigins ;
6878 $ this ->allowedOriginsPatterns =
You can’t perform that action at this time.
0 commit comments