File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 3434 "composer/installers" : " ~1"
3535 },
3636 "require-dev" : {
37- "icanhazstring/composer-unused" : " ^0.7.5"
37+ "icanhazstring/composer-unused" : " ^0.7.5" ,
38+ "vimeo/psalm" : " ^4.3" ,
39+ "squizlabs/php_codesniffer" : " ^3"
3840 }
3941}
Original file line number Diff line number Diff line change @@ -63,6 +63,18 @@ public function initialize(array $options)
6363 $ this ->initTypes ($ options );
6464
6565 $ this ->options = $ options ;
66+
67+ $ this ->initTypes ($ options );
68+
69+ $ this ->options = $ options ;
70+ $ this ->options ['env ' ] = $ this ->options ['env ' ] ?? 'prod ' ;
71+
72+ $ this ->options ['allowed_env ' ] = $ this ->options ['allowed_env ' ] ?? ['prod ' ];
73+ if (count ($ this ->options ['allowed_env ' ]) === 0 ) {
74+ $ this ->options ['allowed_env ' ] = ['prod ' ];
75+ }
76+
77+ $ this ->options ['importancy ' ] = $ this ->options ['importancy ' ] ?? Notification::IMPORTANCE_URGENT ;
6678 }
6779
6880 /**
Original file line number Diff line number Diff line change @@ -79,10 +79,12 @@ return [
7979 // Получатель почты; перебивает параметры родительского модуля
8080 'recipient' => 'email@gmail.com',
8181 // Или какой-нибудь иной способ различения dev/prod среды
82+ // По умолчанию - dev
8283 'env' => env('DEBUG', false) ? 'dev' : 'prod',
83- // В каком окружении работать.
84+ // В каком окружении работать. По умолчанию - prod.
8485 'allowed_env' => ['dev', 'prod'],
8586 // Уровень важности согласно channel_policy (см. документацию к модулю proklung.notifier)
87+ // По умолчанию - urgent
8688 'importancy' => Notification::IMPORTANCE_URGENT,
8789 ),
8890 ),
You can’t perform that action at this time.
0 commit comments