Skip to content

Commit 11503d3

Browse files
committed
Доработки
1 parent fb32c1d commit 11503d3

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
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
}

lib/ErrorHandler.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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
/**

readme.MD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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
),

0 commit comments

Comments
 (0)