Skip to content

Commit 1b4d98f

Browse files
committed
docs(rules): add @author and @SInCE ARFA 1.3 docblocks to all 33 sanitization rules
Add canonical PHPDoc headers to all rule classes across Brazilian, Date, Filter, Html, Numeric, String, and Type categories to conform to the ARFA 1.3 documentation standard. Affected: all 7 rule categories (33 rule classes total)
1 parent 31f3b62 commit 1b4d98f

33 files changed

Lines changed: 141 additions & 0 deletions

src/Rule/Brazilian/FormatCepRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Formats a CEP: 63100000 → 63100-000.
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class FormatCepRule implements SanitizationRule
1418
{

src/Rule/Brazilian/FormatCnpjRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Formats a CNPJ number: 11222333000181 → 11.222.333/0001-81.
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class FormatCnpjRule implements SanitizationRule
1418
{

src/Rule/Brazilian/FormatCpfRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
*
1313
* If the input is already formatted, normalizes it.
1414
* If the digit count is not 11, returns as-is.
15+
*
16+
* @author Walmir Silva <walmir.silva@kariricode.org>
17+
*
18+
* @since 3.1.0 ARFA 1.3
1519
*/
1620
final readonly class FormatCpfRule implements SanitizationRule
1721
{

src/Rule/Date/NormalizeDateRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* Normalizes a date string to a standard format.
1212
*
1313
* Parameters: from (string, default 'd/m/Y'), to (string, default 'Y-m-d').
14+
*
15+
* @author Walmir Silva <walmir.silva@kariricode.org>
16+
*
17+
* @since 3.1.0 ARFA 1.3
1418
*/
1519
final readonly class NormalizeDateRule implements SanitizationRule
1620
{

src/Rule/Date/TimestampToDateRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* Converts a Unix timestamp to a formatted date string.
1212
*
1313
* Parameters: format (string, default 'Y-m-d H:i:s'), timezone (string, default 'UTC').
14+
*
15+
* @author Walmir Silva <walmir.silva@kariricode.org>
16+
*
17+
* @since 3.1.0 ARFA 1.3
1418
*/
1519
final readonly class TimestampToDateRule implements SanitizationRule
1620
{

src/Rule/Filter/AlphaOnlyRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Strips all non-letter characters (Unicode-aware via \pL).
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class AlphaOnlyRule implements SanitizationRule
1418
{

src/Rule/Filter/AlphanumericOnlyRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Strips all non-alphanumeric characters (Unicode-aware).
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class AlphanumericOnlyRule implements SanitizationRule
1418
{

src/Rule/Filter/DigitsOnlyRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Strips all non-digit characters from a string.
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class DigitsOnlyRule implements SanitizationRule
1418
{

src/Rule/Filter/EmailFilterRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Sanitizes an email address: trims, lowercases, removes illegal chars.
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class EmailFilterRule implements SanitizationRule
1418
{

src/Rule/Html/HtmlDecodeRule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
/**
1111
* Decodes HTML entities back to characters.
12+
*
13+
* @author Walmir Silva <walmir.silva@kariricode.org>
14+
*
15+
* @since 3.1.0 ARFA 1.3
1216
*/
1317
final readonly class HtmlDecodeRule implements SanitizationRule
1418
{

0 commit comments

Comments
 (0)