mirror of
https://github.com/ivuorinen/monolog-gdpr-filter.git
synced 2026-03-11 10:00:36 +00:00
chore: cleanup, update workflows, codestyle
This commit is contained in:
@@ -127,8 +127,6 @@ class GdprDefaultPatternsTest extends TestCase
|
||||
$this->assertSame($notApiKey, $processor->maskMessage($notApiKey));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testPatternMac(): void
|
||||
{
|
||||
$patterns = GdprProcessor::getDefaultPatterns();
|
||||
|
||||
@@ -303,6 +303,7 @@ class GdprProcessorTest extends TestCase
|
||||
};
|
||||
$processor = new GdprProcessor($invalidPattern);
|
||||
$processor->setAuditLogger($logger);
|
||||
|
||||
$result = $processor->regExpMessage('test');
|
||||
$this->assertTrue($called, 'Audit logger should be called on preg_replace error');
|
||||
$this->assertSame('test', $result, 'Message should be unchanged if preg_replace fails');
|
||||
|
||||
@@ -13,8 +13,6 @@ use Monolog\JsonSerializableDateTimeImmutable;
|
||||
use Monolog\Level;
|
||||
use Monolog\Logger;
|
||||
use Monolog\LogRecord;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
use ReflectionMethod;
|
||||
use Stringable;
|
||||
|
||||
@@ -62,7 +60,7 @@ trait TestHelpers
|
||||
object|string $object,
|
||||
string $methodName = '',
|
||||
): ReflectionMethod {
|
||||
if (empty($methodName) && is_string($object)) {
|
||||
if (($methodName === '' || $methodName === '0') && is_string($object)) {
|
||||
$method = new ReflectionMethod($object);
|
||||
} else {
|
||||
$method = new ReflectionMethod($object, $methodName);
|
||||
|
||||
Reference in New Issue
Block a user