PHPackages                             rskuipers/php-assumptions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. rskuipers/php-assumptions

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rskuipers/php-assumptions
=========================

Static code analysis tool to detect weak assumptions

0.9.1(1y ago)164308.5k—9.4%12[9 issues](https://github.com/rskuipers/php-assumptions/issues)10MITPHP

Since Aug 5Pushed 1y ago3 watchersCompare

[ Source](https://github.com/rskuipers/php-assumptions)[ Packagist](https://packagist.org/packages/rskuipers/php-assumptions)[ RSS](/packages/rskuipers-php-assumptions/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (4)Versions (15)Used By (10)

PHP Assumptions
===============

[](#php-assumptions)

[![Build Status](https://camo.githubusercontent.com/6bb61c1ec2bd5b7c4238a66ad0f01ddf1cd5391a69260169174409c01b609a4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72736b7569706572732f7068702d617373756d7074696f6e732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rskuipers/php-assumptions/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/62f73b8ba325e1e63117dcd7d7f8ff5d49bfd79bb8e9a05c2d7abbccae1e30bc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72736b7569706572732f7068702d617373756d7074696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rskuipers/php-assumptions/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/158efe7fde49a008fe2a0f75c71e0a5479855a2de85fe25bdd063a7545cf460a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72736b7569706572732f7068702d617373756d7074696f6e732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rskuipers/php-assumptions/?branch=master)

Setup
-----

[](#setup)

```
$ composer require --dev rskuipers/php-assumptions
```

Introduction
------------

[](#introduction)

PHP Assumptions is the result of a proof of concept inspired by the "[From assumptions to assertions](http://rskuipers.com/entry/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
-----

[](#tests)

This project is built with [PHPUnit](https://github.com/sebastianbergmann/phpunit) and [Prophecy](https://github.com/phpspec/prophecy-phpunit). In order to run these tests make sure you have dev dependencies installed with composer.

Running PHPUnit:

```
$ ./vendor/bin/phpunit
```

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance41

Moderate activity, may be stable

Popularity50

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 67.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~319 days

Recently: every ~623 days

Total

12

Last Release

468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f985f18147d5d21625c267a5378665043f86bb92f14338e72b7c025d26ee1a0d?d=identicon)[rskuipers](/maintainers/rskuipers)

---

Top Contributors

[![rskuipers](https://avatars.githubusercontent.com/u/1918518?v=4)](https://github.com/rskuipers "rskuipers (41 commits)")[![mallardduck](https://avatars.githubusercontent.com/u/619938?v=4)](https://github.com/mallardduck "mallardduck (6 commits)")[![dennisdegreef](https://avatars.githubusercontent.com/u/361905?v=4)](https://github.com/dennisdegreef "dennisdegreef (4 commits)")[![nstapelbroek](https://avatars.githubusercontent.com/u/3368018?v=4)](https://github.com/nstapelbroek "nstapelbroek (2 commits)")[![segrax](https://avatars.githubusercontent.com/u/1327406?v=4)](https://github.com/segrax "segrax (2 commits)")[![umpirsky](https://avatars.githubusercontent.com/u/208957?v=4)](https://github.com/umpirsky "umpirsky (1 commits)")[![vpassapera](https://avatars.githubusercontent.com/u/1493758?v=4)](https://github.com/vpassapera "vpassapera (1 commits)")[![johnatas-x](https://avatars.githubusercontent.com/u/34005481?v=4)](https://github.com/johnatas-x "johnatas-x (1 commits)")[![MacFJA](https://avatars.githubusercontent.com/u/1475671?v=4)](https://github.com/MacFJA "MacFJA (1 commits)")[![MetalArend](https://avatars.githubusercontent.com/u/1175661?v=4)](https://github.com/MetalArend "MetalArend (1 commits)")[![niconoe-](https://avatars.githubusercontent.com/u/9560327?v=4)](https://github.com/niconoe- "niconoe- (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rskuipers-php-assumptions/health.svg)

```
[![Health](https://phpackages.com/badges/rskuipers-php-assumptions/health.svg)](https://phpackages.com/packages/rskuipers-php-assumptions)
```

###  Alternatives

[phpunit/php-code-coverage

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

8.9k935.9M1.7k](/packages/phpunit-php-code-coverage)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k101.8M2.2k](/packages/behat-behat)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[phparkitect/phparkitect

Enforce architectural constraints in your PHP applications

9224.3M28](/packages/phparkitect-phparkitect)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
