rskuipers/php-assumptions 问题修复 & 功能扩展

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

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

rskuipers/php-assumptions

最新稳定版本:0.9.1

Composer 安装命令:

composer require rskuipers/php-assumptions

包简介

Static code analysis tool to detect weak assumptions

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

Setup

$ composer require --dev rskuipers/php-assumptions

Introduction

PHP Assumptions is the result of a proof of concept inspired by the "From assumptions to assertions" blog post. It's a static code analysis tool doing checks for weak assumptions.

This is an example of an assumption:

if ($user !== null) {
    $user->logout();
}

Running bin/phpa on this file would yield the following output:

----------------------------------------------
| file        | line | message               |
==============================================
| example.php | 3    | if ($user !== null) { |
----------------------------------------------

1 out of 1 boolean expressions are assumptions (100%)

This is an example of an assertion:

if ($user instanceof User) {
    $user->logout();
}

Tests

This project is built with PHPUnit and Prophecy. In order to run these tests make sure you have dev dependencies installed with composer.

Running PHPUnit:

$ ./vendor/bin/phpunit

统计信息

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

GitHub 信息

  • Stars: 164
  • Watchers: 3
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-04