2017 © Pedro Peláez
 

library php-assumptions

Static code analysis tool to detect weak assumptions

image

rskuipers/php-assumptions

Static code analysis tool to detect weak assumptions

  • Friday, May 25, 2018
  • by rskuipers
  • Repository
  • 5 Watchers
  • 89 Stars
  • 19,752 Installations
  • PHP
  • 4 Dependents
  • 1 Suggesters
  • 5 Forks
  • 6 Open issues
  • 11 Versions
  • 25 % Grown

The README.md

PHP Assumptions

Build Status Scrutinizer Code Quality Code Coverage, (*1)

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., (*2)

This is an example of an assumption:, (*3)

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

Running bin/phpa on this file would yield the following output:, (*4)

----------------------------------------------
| 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:, (*5)

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., (*6)

Running PHPUnit:, (*7)

$ ./vendor/bin/phpunit

The Versions

25/05 2018

dev-master

9999999-dev

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2018

0.7.1

0.7.1.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2018

dev-feature/add-version-command

dev-feature/add-version-command

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

01/03 2018

0.7.0

0.7.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

01/09 2017

0.6.0

0.6.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

01/09 2017

dev-feature/php-7-1

dev-feature/php-7-1

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

15/11 2016

0.5.0

0.5.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

23/08 2015

0.4.0

0.4.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

15/08 2015

0.3.0

0.3.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

09/08 2015

0.2.0

0.2.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires

 

The Development Requires

05/08 2015

0.1.0

0.1.0.0

Static code analysis tool to detect weak assumptions

  Sources   Download

MIT

The Requires