Skip to content

Commit 56df29e

Browse files
committed
refactor Mock FileHandler
1 parent cf62d1b commit 56df29e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

system/Test/Mock/MockFileLogger.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,24 @@
1616
use CodeIgniter\Log\Handlers\FileHandler;
1717

1818
/**
19-
* Class MockFileLogger
20-
*
2119
* Extends FileHandler, exposing some inner workings
2220
*/
2321
class MockFileLogger extends FileHandler
2422
{
2523
/**
2624
* Where would the log be written?
25+
*
26+
* @var string
2727
*/
2828
public $destination;
2929

30+
/**
31+
* @param array{handles?: list<string>, path?: string, fileExtension?: string, filePermissions?: int} $config
32+
*/
3033
public function __construct(array $config)
3134
{
3235
parent::__construct($config);
33-
$this->handles = $config['handles'] ?? [];
36+
3437
$this->destination = $this->path . 'log-' . date('Y-m-d') . '.' . $this->fileExtension;
3538
}
3639
}

0 commit comments

Comments
 (0)