PHPackages                             okeyaki/preport - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. okeyaki/preport

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

okeyaki/preport
===============

A simple PHP rule engine.

0.1.0(10y ago)126MITPHPPHP ~5.5

Since Dec 27Pushed 10y agoCompare

[ Source](https://github.com/okeyaki/preport)[ Packagist](https://packagist.org/packages/okeyaki/preport)[ RSS](/packages/okeyaki-preport/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Preport
=======

[](#preport)

A simple PHP rule engine.

Usage
-----

[](#usage)

### 1. Build reporter.

[](#1-build-reporter)

```
use Preport\Reporter;

$reporter = new Reporter;

$reporter->report('too_short_input')
    ->where(function () use ($input) {
        return strlen($input) < 4;
    });

$reporter->report('too_long_input')
    ->where(function () use ($input) {
        return strlen($input) > 8;
    })
    ->unless('too_short_input');

$reporter->report('no_input')
    ->where(function () use ($input) {
        return !$input;
    });
    ->when('too_short_input');
```

### 2. Get reports.

[](#2-get-reports)

```
$reports = $reporter->walk();

foreach ($reports as $report) {
    echo $report->subject();
}
```

```
> $input = 'foo';
too_short_input

> $input = '';
too_short_input
no_input

> $input = 'foobarbaz';
too_long_input

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7233643e9ea218cc3c03201d6e4a1d8ce44a4046a902ddfea91174f03e545f81?d=identicon)[okeyaki](/maintainers/okeyaki)

### Embed Badge

![Health badge](/badges/okeyaki-preport/health.svg)

```
[![Health](https://phpackages.com/badges/okeyaki-preport/health.svg)](https://phpackages.com/packages/okeyaki-preport)
```

PHPackages © 2026

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