Download the PHP package samuelpietro/cnpjutils without Composer

On this page you can find all versions of the php package samuelpietro/cnpjutils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cnpjutils

CNPJUtils

PHP License

CNPJUtils é uma biblioteca PHP de código aberto que oferece funções úteis para trabalhar com o novo padrão de CNPJ alfanumérico do Brasil. Esta biblioteca permite calcular dígitos verificadores e validar o formato do CNPJ conforme o novo padrão de doze caracteres alfanuméricos e dois dígitos numéricos.

Funcionalidades

Estrutura do Projeto

A estrutura do projeto é organizada para facilitar o desenvolvimento modular.

Requisitos

Instalação

  1. Para instalar a biblioteca via Composer, execute o seguinte comando:

Uso

  1. Para gerar um CNPJ:

  2. Para validar a formatação/máscara de um CNPJ:

  3. Para mascarar um CNPJ:

  4. Para remover a máscara de um CNPJ:

  5. Para calcular os dígitos verificadores de um CNPJ:

Documentação Técnica

1. Cálculo dos Dígitos Verificadores do CNPJ Alfanumérico

  1. O CNPJ é composto por doze caracteres alfanuméricos e dois dígitos verificadores (DV) calculados em duas etapas.
  2. Os pesos para o cálculo são distribuídos de 2 a 9, aplicados da direita para a esquerda, reiniciando após o oitavo dígito.
  3. A soma ponderada dos valores ASCII dos caracteres determina os dígitos verificadores conforme o módulo 11.

Contribuindo

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues ou enviar pull requests para adicionar melhorias e novas funcionalidades.

Para enviar pull requests siga os passos abaixo.

  1. Faça um fork do repositório
  2. Crie uma branch (git checkout -b minha-feature)
  3. Commit as suas alterações (git commit -m 'Minha nova feature')
  4. Envie para o repositório (git push origin minha-feature)
  5. Abra um pull request

Licença

Este projeto está licenciado sob a Licença MIT, que permite o uso, modificação e distribuição do ‘software’ para qualquer finalidade, desde que a atribuição ao autor original, Samuel Pietro, seja mantida em todas as cópias, modificações ou distribuições do ‘Software’.

© 2024 Samuel Pietro / CNPJUtils


All versions of cnpjutils with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package samuelpietro/cnpjutils contains the following files

Loading the files please wait ....