PHPackages                             thefox/logic - 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. thefox/logic

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

thefox/logic
============

Logic Gates and Criteria Tree

v1.0.0(9y ago)049811GPL-3.0PHPPHP ^7.0CI failing

Since Jun 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/TheFox/logic)[ Packagist](https://packagist.org/packages/thefox/logic)[ Docs](https://fox21.at)[ RSS](/packages/thefox-logic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (1)

Logic Gates and Criteria Tree for PHP
=====================================

[](#logic-gates-and-criteria-tree-for-php)

Project Outlines
----------------

[](#project-outlines)

The project outlines as described in my blog post about [Open Source Software Collaboration](https://blog.fox21.at/2019/02/21/open-source-software-collaboration.html).

- The main purpose of this library is to provide an object-oriented approach to logic gates for PHP.
- This list is open. Feel free to request features.

Features
--------

[](#features)

- AND
- OR
- NOR

TODO
----

[](#todo)

- XOR
- etc?

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/thefox/assembly) and [Composer](https://getcomposer.org/). Run the following command to install the package and add it as a requirement to composer.json:

```
composer require thefox/logic
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

2

Last Release

3304d ago

Major Versions

v0.1.0 → v1.0.02017-06-14

### Community

Maintainers

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

---

Top Contributors

[![TheFox](https://avatars.githubusercontent.com/u/353709?v=4)](https://github.com/TheFox "TheFox (14 commits)")

---

Tags

andcriteriacriteria-treegatelogiclogic-gatesmit-licensenotorphpphp-libraryphp7treelogicgateandorNotandgateorgatenotgatecriteriatree

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thefox-logic/health.svg)

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

###  Alternatives

[knplabs/knp-menu

An object oriented menu library

1.4k58.1M337](/packages/knplabs-knp-menu)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k13.2M174](/packages/cuyz-valinor)[bluem/tree

Library for handling tree structures based on parent IDs

251953.3k7](/packages/bluem-tree)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[loophp/phptree

An implementation of tree data structure

981.8M2](/packages/loophp-phptree)[maxazan/jquery-treegrid

jquery treegrid plugin

55754.6k](/packages/maxazan-jquery-treegrid)

PHPackages © 2026

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