diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index 95e8b19..b48f7c0 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":1,"defects":{"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeCreditCardNumber":7,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithDifferentSeparators":8,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithoutCreditCardNumber":8,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#5":7,"Unit\\FacelessLoggerTest::testSingletonInstance":8,"Unit\\FacelessLoggerTest::testAddAndProcessDetectorAnonymizer":8,"Unit\\FacelessLoggerTest::testClearDefaultDetectors":8,"Unit\\FacelessLoggerTest::testClearDefaultAnonymizers":8,"Unit\\FacelessLoggerTest::testProcessMessageWithNoDetectors":8},"times":{"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithDashedDateFormat":0.17,"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithSlashedDateFormat":0,"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithoutDate":0,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeCreditCardNumber":0.008,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithDifferentSeparators":0,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithoutCreditCardNumber":0,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeEmailAddress":0.008,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeMultipleEmailAddresses":0,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeWithoutEmailAddress":0,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizePhoneNumber":0.008,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizeMultiplePhoneNumbers":0,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizeWithoutPhoneNumber":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsBrazilianFormatDate":0.014,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsISOFormatDate":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#with pt-br date":0.018,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#with iso date":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#without date":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#without iso date":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#0":0.008,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#1":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#2":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#3":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#4":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#5":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#6":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#0":0.008,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#1":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#2":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#3":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#0":0.008,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#1":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#2":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#3":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#4":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#5":0,"Unit\\FacelessLoggerTest::testSingletonInstance":0.465,"Unit\\FacelessLoggerTest::testAddAndProcessDetectorAnonymizer":0,"Unit\\FacelessLoggerTest::testClearDefaultDetectors":0.008,"Unit\\FacelessLoggerTest::testClearDefaultAnonymizers":0,"Unit\\FacelessLoggerTest::testProcessMessageWithNoDetectors":0}} \ No newline at end of file +{"version":1,"defects":{"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeCreditCardNumber":7,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithDifferentSeparators":8,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithoutCreditCardNumber":8,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#5":7,"Unit\\FacelessLoggerTest::testSingletonInstance":8,"Unit\\FacelessLoggerTest::testAddAndProcessDetectorAnonymizer":8,"Unit\\FacelessLoggerTest::testClearDefaultDetectors":8,"Unit\\FacelessLoggerTest::testClearDefaultAnonymizers":8,"Unit\\FacelessLoggerTest::testProcessMessageWithNoDetectors":8},"times":{"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithDashedDateFormat":0.159,"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithSlashedDateFormat":0,"Unit\\Anonymizers\\BirthDateAnonymizerTest::testAnonymizeWithoutDate":0,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeCreditCardNumber":0.009,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithDifferentSeparators":0,"Unit\\Anonymizers\\CreditCardAnonymizerTest::testAnonymizeWithoutCreditCardNumber":0,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeEmailAddress":0.008,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeMultipleEmailAddresses":0,"Unit\\Anonymizers\\EmailAnonymizerTest::testAnonymizeWithoutEmailAddress":0,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizePhoneNumber":0.009,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizeMultiplePhoneNumbers":0,"Unit\\Anonymizers\\PhoneAnonymizerTest::testAnonymizeWithoutPhoneNumber":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsBrazilianFormatDate":0.014,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsISOFormatDate":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#with pt-br date":0.018,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#with iso date":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#without date":0,"Unit\\Detectors\\BirthDateDetectorTest::testDetectsDate#without iso date":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#0":0.009,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#1":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#2":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#3":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#4":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#5":0,"Unit\\Detectors\\CreditCardDetectorTest::testDetectsCreditCard#6":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#0":0.008,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#1":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#2":0,"Unit\\Detectors\\EmailDetectorTest::testDetectsEmail#3":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#0":0.008,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#1":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#2":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#3":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#4":0,"Unit\\Detectors\\PhoneDetectorTest::testDetectsPhone#5":0,"Unit\\FacelessLoggerTest::testSingletonInstance":0.005,"Unit\\FacelessLoggerTest::testAddAndProcessDetectorAnonymizer":0,"Unit\\FacelessLoggerTest::testClearDefaultDetectors":0.007,"Unit\\FacelessLoggerTest::testClearDefaultAnonymizers":0,"Unit\\FacelessLoggerTest::testProcessMessageWithNoDetectors":0,"Unit\\Aspect\\LogAnonymizerAspectTest::testProcess":0.146}} \ No newline at end of file diff --git a/Anonymizers/AnonymizerInterface.php.html b/Anonymizers/AnonymizerInterface.php.html index 984bf41..f415b51 100644 --- a/Anonymizers/AnonymizerInterface.php.html +++ b/Anonymizers/AnonymizerInterface.php.html @@ -80,7 +80,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Anonymizers/BirthDateAnonymizer.php.html b/Anonymizers/BirthDateAnonymizer.php.html index 0c59225..747e138 100644 --- a/Anonymizers/BirthDateAnonymizer.php.html +++ b/Anonymizers/BirthDateAnonymizer.php.html @@ -151,7 +151,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Anonymizers/CreditCardAnonymizer.php.html b/Anonymizers/CreditCardAnonymizer.php.html index 920f2be..d649e19 100644 --- a/Anonymizers/CreditCardAnonymizer.php.html +++ b/Anonymizers/CreditCardAnonymizer.php.html @@ -153,7 +153,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Anonymizers/EmailAnonymizer.php.html b/Anonymizers/EmailAnonymizer.php.html index c2cef75..9751ab7 100644 --- a/Anonymizers/EmailAnonymizer.php.html +++ b/Anonymizers/EmailAnonymizer.php.html @@ -161,7 +161,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Anonymizers/PhoneAnonymizer.php.html b/Anonymizers/PhoneAnonymizer.php.html index 93661ee..4afd515 100644 --- a/Anonymizers/PhoneAnonymizer.php.html +++ b/Anonymizers/PhoneAnonymizer.php.html @@ -153,7 +153,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Anonymizers/dashboard.html b/Anonymizers/dashboard.html index 3df9a93..ad1956a 100644 --- a/Anonymizers/dashboard.html +++ b/Anonymizers/dashboard.html @@ -136,7 +136,7 @@

Project Risks

diff --git a/Anonymizers/index.html b/Anonymizers/index.html index d1740f8..7175294 100644 --- a/Anonymizers/index.html +++ b/Anonymizers/index.html @@ -208,7 +208,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Aspect/LogAnonymizerAspect.php.html b/Aspect/LogAnonymizerAspect.php.html index e569646..5d09a2f 100644 --- a/Aspect/LogAnonymizerAspect.php.html +++ b/Aspect/LogAnonymizerAspect.php.html @@ -43,105 +43,105 @@ - Total -
-
- 0.00% covered (danger) + Total +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 4
-
-
- 0.00% covered (danger) +
100.00%
+
4 / 4
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 2
- CRAP -
-
- 0.00% covered (danger) +
100.00%
+
2 / 2
+ CRAP +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
- LogAnonymizerAspect -
-
- 0.00% covered (danger) + LogAnonymizerAspect +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 4
-
-
- 0.00% covered (danger) +
100.00%
+
4 / 4
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 2
- 6 -
-
- 0.00% covered (danger) +
100.00%
+
2 / 2
+ 2 +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
-  __construct -
-
- 0.00% covered (danger) +  __construct +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
-
-
- 0.00% covered (danger) +
100.00%
+
1 / 1
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
- 2 - +
100.00%
+
1 / 1
+ 1 + -  process -
-
- 0.00% covered (danger) +  process +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 3
-
-
- 0.00% covered (danger) +
100.00%
+
3 / 3
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
- 2 - +
100.00%
+
1 / 1
+ 1 + @@ -168,7 +168,7 @@ 16 17    public function __construct(FacelessLogger $logger) 18    { - 19        $this->logger = $logger; + 19        $this->logger = $logger; 20    } 21 22    public array $classes = [ @@ -180,9 +180,9 @@ 28     */ 29    public function process(ProceedingJoinPoint $proceedingJoinPoint) 30    { - 31        $arguments = $proceedingJoinPoint->getArguments(); - 32        $arguments[0] = $this->logger->processMessage($arguments[0]); - 33        return $proceedingJoinPoint->process($arguments); + 31        $arguments = $proceedingJoinPoint->getArguments(); + 32        $arguments[0] = $this->logger->processMessage($arguments[0]); + 33        return $proceedingJoinPoint->process($arguments); 34    } 35} @@ -195,7 +195,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Aspect/dashboard.html b/Aspect/dashboard.html index 1bc9a7e..305cae6 100644 --- a/Aspect/dashboard.html +++ b/Aspect/dashboard.html @@ -58,7 +58,6 @@

Insufficient Coverage

-
FacelessLog\Aspect\LogAnonymizerAspect0% @@ -112,8 +111,6 @@

Insufficient Coverage

- __construct0% - process0% @@ -139,7 +136,7 @@

Project Risks

@@ -158,7 +155,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,0], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,1], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -176,7 +173,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([2,0,0,0,0,0,0,0,0,0,0,0], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,2], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -226,7 +223,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[0,2,"FacelessLog\\Aspect\\LogAnonymizerAspect<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,2,"FacelessLog\\Aspect\\LogAnonymizerAspect<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -250,7 +247,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[0,1,"
FacelessLog\\Aspect\\LogAnonymizerAspect::__construct<\/a>"],[0,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::process<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::__construct<\/a>"],[100,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::process<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/Aspect/index.html b/Aspect/index.html index 6b85716..5200cfe 100644 --- a/Aspect/index.html +++ b/Aspect/index.html @@ -43,59 +43,59 @@ - Total -
-
- 0.00% covered (danger) + Total +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 4
-
-
- 0.00% covered (danger) +
100.00%
+
4 / 4
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 2
-
-
- 0.00% covered (danger) +
100.00%
+
2 / 2
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
-
LogAnonymizerAspect.php -
-
- 0.00% covered (danger) + LogAnonymizerAspect.php +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 4
-
-
- 0.00% covered (danger) +
100.00%
+
4 / 4
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 2
-
-
- 0.00% covered (danger) +
100.00%
+
2 / 2
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
@@ -111,7 +111,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/BirthDateDetector.php.html b/Detectors/BirthDateDetector.php.html index 84bd69d..4218316 100644 --- a/Detectors/BirthDateDetector.php.html +++ b/Detectors/BirthDateDetector.php.html @@ -152,7 +152,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/CreditCardDetector.php.html b/Detectors/CreditCardDetector.php.html index 1d7209c..69e64ce 100644 --- a/Detectors/CreditCardDetector.php.html +++ b/Detectors/CreditCardDetector.php.html @@ -149,7 +149,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/DetectorInterface.php.html b/Detectors/DetectorInterface.php.html index e96d493..831627b 100644 --- a/Detectors/DetectorInterface.php.html +++ b/Detectors/DetectorInterface.php.html @@ -80,7 +80,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/EmailDetector.php.html b/Detectors/EmailDetector.php.html index a44118b..0652a15 100644 --- a/Detectors/EmailDetector.php.html +++ b/Detectors/EmailDetector.php.html @@ -150,7 +150,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/PhoneDetector.php.html b/Detectors/PhoneDetector.php.html index 1129b8f..ee58e45 100644 --- a/Detectors/PhoneDetector.php.html +++ b/Detectors/PhoneDetector.php.html @@ -149,7 +149,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/Detectors/dashboard.html b/Detectors/dashboard.html index 9d0f92d..a809794 100644 --- a/Detectors/dashboard.html +++ b/Detectors/dashboard.html @@ -136,7 +136,7 @@

Project Risks

diff --git a/Detectors/index.html b/Detectors/index.html index 6b4e161..bffbf43 100644 --- a/Detectors/index.html +++ b/Detectors/index.html @@ -208,7 +208,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/FacelessLogger.php.html b/FacelessLogger.php.html index 9ddc4d2..a03c3a5 100644 --- a/FacelessLogger.php.html +++ b/FacelessLogger.php.html @@ -313,7 +313,7 @@

Legend

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/coverage.xml b/coverage.xml index f37975b..d3c571f 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,6 +1,6 @@ - - + + @@ -56,15 +56,15 @@ - + - - - - - - - + + + + + + + @@ -132,6 +132,6 @@ - + diff --git a/dashboard.html b/dashboard.html index a81c50d..a58f3ed 100644 --- a/dashboard.html +++ b/dashboard.html @@ -57,7 +57,6 @@

Insufficient Coverage

-
FacelessLog\Aspect\LogAnonymizerAspect0% @@ -111,8 +110,6 @@

Insufficient Coverage

- __construct0% - process0% @@ -138,7 +135,7 @@

Project Risks

@@ -157,7 +154,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#classCoverageDistribution svg') - .datum(getCoverageDistributionData([1,0,0,0,0,0,0,0,0,0,0,9], "Class Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,10], "Class Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -175,7 +172,7 @@

Project Risks

.yAxis.tickFormat(d3.format('d')); d3.select('#methodCoverageDistribution svg') - .datum(getCoverageDistributionData([2,0,0,0,0,0,0,0,0,0,0,14], "Method Coverage")) + .datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,0,0,16], "Method Coverage")) .transition().duration(500).call(chart); nv.utils.windowResize(chart.update); @@ -225,7 +222,7 @@

Project Risks

chart.yAxis.axisLabel('Cyclomatic Complexity'); d3.select('#classComplexity svg') - .datum(getComplexityData([[100,1,"FacelessLog\\Anonymizers\\BirthDateAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\CreditCardAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\EmailAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\PhoneAnonymizer<\/a>"],[0,2,"FacelessLog\\Aspect\\LogAnonymizerAspect<\/a>"],[100,2,"FacelessLog\\Detectors\\BirthDateDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\CreditCardDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\EmailDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\PhoneDetector<\/a>"],[100,9,"FacelessLog\\FacelessLogger<\/a>"]], 'Class Complexity')) + .datum(getComplexityData([[100,1,"FacelessLog\\Anonymizers\\BirthDateAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\CreditCardAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\EmailAnonymizer<\/a>"],[100,1,"FacelessLog\\Anonymizers\\PhoneAnonymizer<\/a>"],[100,2,"FacelessLog\\Aspect\\LogAnonymizerAspect<\/a>"],[100,2,"FacelessLog\\Detectors\\BirthDateDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\CreditCardDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\EmailDetector<\/a>"],[100,1,"FacelessLog\\Detectors\\PhoneDetector<\/a>"],[100,9,"FacelessLog\\FacelessLogger<\/a>"]], 'Class Complexity')) .transition() .duration(500) .call(chart); @@ -249,7 +246,7 @@

Project Risks

chart.yAxis.axisLabel('Method Complexity'); d3.select('#methodComplexity svg') - .datum(getComplexityData([[100,1,"
FacelessLog\\Anonymizers\\BirthDateAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\CreditCardAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\EmailAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\PhoneAnonymizer::anonymize<\/a>"],[0,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::__construct<\/a>"],[0,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::process<\/a>"],[100,2,"FacelessLog\\Detectors\\BirthDateDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\CreditCardDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\EmailDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\PhoneDetector::detect<\/a>"],[100,1,"FacelessLog\\FacelessLogger::__construct<\/a>"],[100,2,"FacelessLog\\FacelessLogger::getInstance<\/a>"],[100,1,"FacelessLog\\FacelessLogger::addDetector<\/a>"],[100,1,"FacelessLog\\FacelessLogger::clearDefaultDetectors<\/a>"],[100,1,"FacelessLog\\FacelessLogger::clearDefaultAnonymizers<\/a>"],[100,3,"FacelessLog\\FacelessLogger::processMessage<\/a>"]], 'Method Complexity')) + .datum(getComplexityData([[100,1,"FacelessLog\\Anonymizers\\BirthDateAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\CreditCardAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\EmailAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Anonymizers\\PhoneAnonymizer::anonymize<\/a>"],[100,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::__construct<\/a>"],[100,1,"FacelessLog\\Aspect\\LogAnonymizerAspect::process<\/a>"],[100,2,"FacelessLog\\Detectors\\BirthDateDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\CreditCardDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\EmailDetector::detect<\/a>"],[100,1,"FacelessLog\\Detectors\\PhoneDetector::detect<\/a>"],[100,1,"FacelessLog\\FacelessLogger::__construct<\/a>"],[100,2,"FacelessLog\\FacelessLogger::getInstance<\/a>"],[100,1,"FacelessLog\\FacelessLogger::addDetector<\/a>"],[100,1,"FacelessLog\\FacelessLogger::clearDefaultDetectors<\/a>"],[100,1,"FacelessLog\\FacelessLogger::clearDefaultAnonymizers<\/a>"],[100,3,"FacelessLog\\FacelessLogger::processMessage<\/a>"]], 'Method Complexity')) .transition() .duration(500) .call(chart); diff --git a/index.html b/index.html index afb133c..635e780 100644 --- a/index.html +++ b/index.html @@ -44,29 +44,29 @@ Total
-
- 91.84% covered (success) +
+ 100.00% covered (success)
-
91.84%
-
45 / 49
-
-
- 87.50% covered (warning) +
100.00%
+
49 / 49
+
+
+ 100.00% covered (success)
-
87.50%
-
14 / 16
+
100.00%
+
16 / 16
-
- 90.00% covered (success) +
+ 100.00% covered (success)
-
90.00%
-
9 / 10
+
100.00%
+
10 / 10
@@ -98,31 +98,31 @@ -
Aspect -
-
- 0.00% covered (danger) + Aspect +
+
+ 100.00% covered (success)
-
0.00%
-
0 / 4
-
-
- 0.00% covered (danger) +
100.00%
+
4 / 4
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 2
-
-
- 0.00% covered (danger) +
100.00%
+
2 / 2
+
+
+ 100.00% covered (success)
-
0.00%
-
0 / 1
+
100.00%
+
1 / 1
@@ -194,7 +194,7 @@

Legend

High: 90% to 100%

- Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:48:12 UTC 2023. + Generated by php-code-coverage 10.1.10 using PHP 8.2.14 and PHPUnit 10.5.5 at Sun Dec 31 21:50:57 UTC 2023.

diff --git a/phpunit-report.html b/phpunit-report.html index d95a6ac..5a4fed8 100644 --- a/phpunit-report.html +++ b/phpunit-report.html @@ -101,6 +101,10 @@

Faceless Logger (Unit\FacelessLogger)

  • Clear default anonymizers
  • Process message with no detectors
  • +

    Log Anonymizer Aspect (Unit\Aspect\LogAnonymizerAspect)

    +
      +
    • Process
    • +

    Phone Anonymizer (Unit\Anonymizers\PhoneAnonymizer)

    • Anonymize phone number
    • diff --git a/tests/Unit/Aspect/LogAnonymizerAspectTest.php b/tests/Unit/Aspect/LogAnonymizerAspectTest.php index 31102d1..04a5bfa 100644 --- a/tests/Unit/Aspect/LogAnonymizerAspectTest.php +++ b/tests/Unit/Aspect/LogAnonymizerAspectTest.php @@ -1,8 +1,48 @@ -logger = $this->createMock(FacelessLogger::class); + $this->aspect = new LogAnonymizerAspect($this->logger); + } + + public function testProcess() + { + $originalMessage = "Sensitive data: 1234-5678-9012-3456"; + $anonymizedMessage = "Anonymized data"; + + $this->logger + ->expects($this->once()) + ->method('processMessage') + ->with($originalMessage) + ->willReturn($anonymizedMessage); + + $proceedingJoinPoint = $this->createMock(ProceedingJoinPoint::class); + $proceedingJoinPoint + ->expects($this->once()) + ->method('getArguments') + ->willReturn([$originalMessage]); + + $proceedingJoinPoint + ->expects($this->once()) + ->method('process') + ->with([$anonymizedMessage]) + ->willReturn('Some return value'); + + $result = $this->aspect->process($proceedingJoinPoint); + + $this->assertEquals('Some return value', $result); + } +}