PHPackages                             freshcells/state-inspector - 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. freshcells/state-inspector

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

freshcells/state-inspector
==========================

inspects the state of a given object

2.1.0(4y ago)031.0k↓34.6%1MITPHPPHP ^7.4|^8.0|^8.1

Since Nov 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/freshcells/state-inspector)[ Packagist](https://packagist.org/packages/freshcells/state-inspector)[ Docs](https://github.com/freshcells/state-inspector)[ RSS](/packages/freshcells-state-inspector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

state-inspector
===============

[](#state-inspector)

[![Latest Version on Packagist](https://camo.githubusercontent.com/53c86c2c618da8598a38d234a8e1326e699701c9501c616764aed638a710f2df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f667265736863656c6c732f73746174652d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/freshcells/state-inspector)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://github.com/freshcells/state-inspector/actions/workflows/main.yml/badge.svg)](https://github.com/freshcells/state-inspector/actions)[![Coverage Status](https://camo.githubusercontent.com/5ee6feb970cddd14b3ae16437fb9a2b020923690a7584585b239f848dd163660/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f667265736863656c6c732f73746174652d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/freshcells/state-inspector/code-structure)[![Quality Score](https://camo.githubusercontent.com/f80843ad11d3ad40e79cfaad9021e0271a0168e3bd0b831f2ad6c4d2d409faa1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f667265736863656c6c732f73746174652d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/freshcells/state-inspector)[![Total Downloads](https://camo.githubusercontent.com/227a2b5ea24e276392a311a74a67bf5edc263aa5cea50bdc4d0c2cdfc0c388ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f667265736863656c6c732f73746174652d696e73706563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/freshcells/state-inspector)

**Use Case:**
Inspect if a state tree, a nested object or any object has certain states or values.

An Inspector can take n Inspections and an Inspection can produce several Issues. The Inspector iterates Inspections which inspect the given object.

When the *bubble* option is true it will throw an exception immediatly if one occurs. If *bubble* is false it will collect issues and they can be retrieved after Inspector has finished.

Install
-------

[](#install)

Via Composer

```
$ composer require freshcells/state-inspector
```

Usage
-----

[](#usage)

```
    $inspector = new StateInspector();
    $inspector->addInspection(new FooInspection());
    $issues = $inspector->inspect($object);

```

See tests.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ivo Bathke](https://github.com/freshcells)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 92.6% 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 ~488 days

Total

5

Last Release

1512d ago

Major Versions

1.0.2 → 2.0.02021-04-08

PHP version history (3 changes)1.0.0PHP ~7.0

2.0.0PHP ^7.4

2.1.0PHP ^7.4|^8.0|^8.1

### Community

Maintainers

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

---

Top Contributors

[![ivoba](https://avatars.githubusercontent.com/u/471254?v=4)](https://github.com/ivoba "ivoba (25 commits)")[![ekramtouir](https://avatars.githubusercontent.com/u/102581575?v=4)](https://github.com/ekramtouir "ekramtouir (2 commits)")

---

Tags

state-inspector

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/freshcells-state-inspector/health.svg)

```
[![Health](https://phpackages.com/badges/freshcells-state-inspector/health.svg)](https://phpackages.com/packages/freshcells-state-inspector)
```

PHPackages © 2026

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