Skip to content

Commit 699e6ee

Browse files
committed
styles(cnpj): Formats the code based on PHPCS standards.
1 parent 884e8a7 commit 699e6ee

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/Validators/Cnpj.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use function array_sum;
2525
use function count;
2626
use function is_scalar;
27+
use function ord;
2728
use function preg_replace;
2829
use function str_split;
2930

@@ -74,7 +75,7 @@ public function isValid(mixed $input): bool
7475
return $digits[13] == $check;
7576
}
7677

77-
/** @return int[] */
78+
/** @return string[] */
7879
private function getChars(string $input): array
7980
{
8081
return array_map(
@@ -85,12 +86,16 @@ private function getChars(string $input): array
8586
);
8687
}
8788

88-
/** @return int[] */
89+
/**
90+
* @param array<string> $input
91+
*
92+
* @return int[]
93+
*/
8994
private function transformToAscii(array $input): array
9095
{
9196
return array_map(
92-
fn (string $character) => ord($character) - self::BASE_ASCII,
93-
$input
97+
static fn(string $character) => ord($character) - self::BASE_ASCII,
98+
$input,
9499
);
95100
}
96101
}

0 commit comments

Comments
 (0)