widmogrod/php-exceptions 问题修复 & 功能扩展

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

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

widmogrod/php-exceptions

最新稳定版本:0.1.0

Composer 安装命令:

composer require widmogrod/php-exceptions

包简介

Collection PHP exceptions grouped by functionality with nice ::assert API

README 文档

README

Introduction

How many times you throw exceptions in your code? and how many of them are repeating?

This library collects general use cases and provide nice ::assert API.

Use it, don't waste your development time for custom exceptions, use one of our exceptions classes.

Usage

Tired of writing is_array($value) || $value instanceof \Traversable? Use predefined assertions and save your time, like so:

use Exception\InvalidTypeException;

function thatCanCantBeViolated($arrayOrTraversable) {
    InvalidTypeException::assertIsTraversable($arrayOrTraversable);
    // do your regular work
}

Installation

composer require widmogrod/php-exceptions

Development

This repository follows semantic versioning concept. If you want to contribute, just follow GitHub workflow and open a pull request.

Testing

Quality assurance is brought to you by PHPSpec

composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-26