Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Versao com diversas atualizacoes, ver CHANGELOG.md
  • Loading branch information
geekcom committed Feb 1, 2022
commit ae6390c6fdca2b706c7bbaffd8ce2a8cefcd6f81
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ composer.lock
docker-compose.yml
.phpcs-cache
.phpunit.result.cache
phpunit.xml.dist
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
A partir da versão 3.5.1 nosso modelo de logs é baseado em [mantenha um changelog](https://keepachangelog.com/pt-BR/1.0.0/) e o
nosso versionamento continua sendo [versionamento semântico](https://semver.org/lang/pt-BR/).

## [3.6.0](https://github.com/geekcom/validator-docs/compare/3.5.3...3.6.0)

## Novidades

- Corrigido: A documentação referente a validação de inscrição estadual.
- Atualizado:
- A versão mínima do PHP, e algumas dependências do projeto;
- As classes de validação de formatos de documentos NIS e CNPJ;
- O arquivo `phpunit.xml` foi adicionado ao `.gitignore`.
- Removido: O arquivo `phpunit.xml`.
- Adicionado:
- O arquivo `phpunit.xml.dist`;
- A possibilidade de rodar testes de unidade via comando `composer testdox`;

## [3.5.4](https://github.com/geekcom/validator-docs/compare/3.5.3...3.5.4)

## Commits
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ $this->validate($request, [

```php
$this->validate($request, [
'inscricao_estadual:UF' => 'required|inscricao_estadual:UF',
'inscricao_estadual' => 'required|inscricao_estadual:UF',
]);
```

Expand Down Expand Up @@ -209,7 +209,7 @@ public function store(Request $request)
'renavam' => 'required|renavam',
'placa' => 'required|placa',
'certidao' => 'required|certidao',
'inscricao_estadual:UF' => 'required|inscricao_estadual:UF',
'inscricao_estadual' => 'required|inscricao_estadual:SP',
]);

dd($data);
Expand All @@ -226,7 +226,7 @@ public function store(Request $request)
* **CPF** - https://geradornv.com.br/gerador-cpf/
* **NIS** - https://www.4devs.com.br/gerador_de_pis_pasep
* **CNS** - https://geradornv.com.br/gerador-cns/
* **CERTIDÃO** - https://www.treinaweb.com.br/ferramentas-para-desenvolvedores/gerador/certidao
* **CERTIDÕES** - https://www.4devs.com.br/gerador_numero_certidoes
* **INSCRIÇÃO ESTADUAL** - https://www.4devs.com.br/gerador_de_inscricao_estadual
* **RENAVAM** - https://www.4devs.com.br/gerador_de_renavam
* **PLACA** - https://www.4devs.com.br/gerador_de_placa_automoveis
Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
}
],
"require": {
"php": ">=7.2",
"php": "^7.3|^8.0",
"thiagocfn/inscricaoestadual": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^8.4|^9.4",
"orchestra/testbench": "^4.0",
"php-coveralls/php-coveralls": "^2.2",
"orchestra/testbench": "^6.0",
"php-coveralls/php-coveralls": "^2.5",
"squizlabs/php_codesniffer": "*",
"phpstan/phpstan": "^0.12.5"
"phpstan/phpstan": "^1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -38,14 +38,15 @@
},
"scripts": {
"phpcs": "phpcs --standard=PSR12 -n src",
"phpcbf" : "phpcbf --standard=PSR12 -n src",
"phpstan": "phpstan analyse src --level 0",
"phpcbf": "phpcbf --standard=PSR12 -n src",
"unit": "phpunit --coverage-clover ./tests/log/clover.xml --colors=always",
"unit-html": "php -d phar.readonly=0 vendor/bin/phpunit --coverage-html ./tests/log/ --colors=always",
"phpstan": "phpstan analyse src --level 0",
"testdox": "phpunit --testdox",
"test": [
"@phpcs",
"@unit",
"@phpstan"
"@phpstan",
"@unit"
]
}
}
21 changes: 0 additions & 21 deletions phpunit.xml

This file was deleted.

4 changes: 3 additions & 1 deletion src/validator-docs/Formats/Cnpj.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace geekcom\ValidatorDocs\Formats;

class Cnpj implements \geekcom\ValidatorDocs\Contracts\ValidatorFormats
use geekcom\ValidatorDocs\Contracts\ValidatorFormats;

class Cnpj implements ValidatorFormats
{
public static function validateFormat(string $value): bool
{
Expand Down
1 change: 0 additions & 1 deletion src/validator-docs/Formats/Nis.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class Nis implements ValidatorFormats
{

public static function validateFormat(string $value): bool
{
return preg_match('/^\d{3}\.\d{5}\.\d{2}-\d{1}$/', $value) > 0;
Expand Down