Skip to content

Commit

Permalink
Use camelCase for add/removeLogger functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Sep 24, 2023
1 parent aaa9fb1 commit bbdb429
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*
* Adding a registered logger is a NOP.
*/
function add_logger(LoggerInterface $logger): void
function addLogger(LoggerInterface $logger): void
{
PsrLogAdapter::addLogger($logger);
}
Expand All @@ -62,7 +62,7 @@ function add_logger(LoggerInterface $logger): void
*
* Removing an unregistered logger is a NOP.
*/
function remove_logger(LoggerInterface $logger): void
function removeLogger(LoggerInterface $logger): void
{
PsrLogAdapter::removeLogger($logger);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/PsrLogAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use Psr\Log\LogLevel;

use function func_get_args;
use function MongoDB\add_logger;
use function MongoDB\addLogger;
use function MongoDB\Driver\Monitoring\mongoc_log;
use function MongoDB\remove_logger;
use function MongoDB\removeLogger;
use function sprintf;

class PsrLogAdapterTest extends BaseTestCase
Expand All @@ -39,12 +39,12 @@ public function testAddAndRemoveLoggerFunctions(): void
mongoc_log(LogSubscriber::LEVEL_INFO, 'domain1', 'info1');
PsrLogAdapter::writeLog(PsrLogAdapter::LEVEL_INFO, 'domain2', 'info2');

add_logger($logger);
addLogger($logger);

mongoc_log(LogSubscriber::LEVEL_INFO, 'domain3', 'info3');
PsrLogAdapter::writeLog(PsrLogAdapter::LEVEL_INFO, 'domain4', 'info4');

remove_logger($logger);
removeLogger($logger);

mongoc_log(LogSubscriber::LEVEL_INFO, 'domain5', 'info5');
PsrLogAdapter::writeLog(PsrLogAdapter::LEVEL_INFO, 'domain6', 'info6');
Expand Down

0 comments on commit bbdb429

Please sign in to comment.