Skip to content

Commit 982a733

Browse files
committed
refactor ErrorlogHandler
1 parent 56df29e commit 982a733

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

system/Log/Handlers/ErrorlogHandler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ class ErrorlogHandler extends BaseHandler
3838
* Says where the error should go. Currently supported are
3939
* 0 (`TYPE_OS`) and 4 (`TYPE_SAPI`).
4040
*
41-
* @var int
41+
* @var 0|4
4242
*/
4343
protected $messageType = 0;
4444

4545
/**
4646
* Constructor.
4747
*
48-
* @param list<mixed> $config
48+
* @param array{handles?: list<string>, messageType?: int} $config
4949
*/
5050
public function __construct(array $config = [])
5151
{
@@ -79,6 +79,8 @@ public function handle($level, $message): bool
7979
/**
8080
* Extracted call to `error_log()` in order to be tested.
8181
*
82+
* @param 0|4 $messageType
83+
*
8284
* @codeCoverageIgnore
8385
*/
8486
protected function errorLog(string $message, int $messageType): bool

tests/system/Log/Handlers/ErrorlogHandlerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public function testErrorLoggingWithErrorLog(): void
3939
}
4040

4141
/**
42+
* @param array{handles?: list<string>, messageType?: int} $config
43+
*
4244
* @return ErrorlogHandler&MockObject
4345
*/
4446
private function getMockedHandler(array $config = [])

0 commit comments

Comments
 (0)