quattror/helpers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

quattror/helpers

最新稳定版本:0.0.20

Composer 安装命令:

composer require quattror/helpers

包简介

Funções comuns que podem ser usadas em qualquer projeto PHP 7.

README 文档

README

helpers

O pacote helpers disponibiliza funcionalidades comuns que podem ser usadas em qualquer projeto PHP 7.

Instalação

$ composer require quattror/helpers

Utilização com traits

use Quattror\Helpers\Traits\UtilHelper;
 
class MyClass
{
    use UtilHelper;
    
    public function myFunction()
    {
        $cpf = '43354377224';
        if ($this->validarCpf($cpf)) {
            ...
        }
    }
    
    public function myOtherFunction()
    {
        $data = '21/10/1982';
        if ($this->validarDataFormatoBr($data)) {
            ...
        }
    }
}

Utilização com classes

use Quattror\Helpers\UtilHelper;
 
class MyClass
{
    public function myFunction()
    {
        $util = new UtilHelper();
        
        $cpf = '43354377224';
        if ($util->validarCpf($cpf))
        {
            ...
        }
    }
}

Teste

Para efetuar os testes basta executar o comando abaixo no terminal:

$ ./vendor/bin/phpunit

Exemplo de saída:

PHPUnit 5.7.21 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.1.6 with Xdebug 2.5.4
Configuration: /Users/alexandre/Documents/github/Quattror/helpers/phpunit.xml

..........................                                        26 / 26 (100%)

Time: 411 ms, Memory: 6.00MB

OK (26 tests, 26 assertions)

Generating code coverage report in Clover XML format ... done

Package

https://packagist.org/packages/Quattror/helpers

Licença

MIT License

Copyright (c) 2017

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

统计信息

  • 总下载量: 879
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-21