You are here

public function BrazilianIdsServiceInterface::formatCpfCnpj in Brazilian IDs 8

Formats a CPF number like 999.999.999-99 or a CNPJ number like 99.999.999/9999-99 depending on the number of digits.

Parameters

string $value: The CPF or CNPJ number to be formatted.

Return value

string The formatted CPF or CNPJ number.

1 method overrides BrazilianIdsServiceInterface::formatCpfCnpj()
BrazilianIdsService::formatCpfCnpj in src/BrazilianIdsService.php
Formats a CPF number like 999.999.999-99 or a CNPJ number like 99.999.999/9999-99 depending on the number of digits.

File

src/BrazilianIdsServiceInterface.php, line 89

Class

BrazilianIdsServiceInterface
Defines the interface of the Brazilian IDs service.

Namespace

Drupal\brazilian_ids

Code

public function formatCpfCnpj($value);