PHPackages                             ht2/couple - 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. ht2/couple

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

ht2/couple
==========

Port of ryansmith94/couple from JS to PHP. A library for coupling two objects together. This is useful for nested pattern matching.

1.0.1(11y ago)0181Creative CommonsPHP

Since Oct 7Pushed 11y agoCompare

[ Source](https://github.com/ht2/couple)[ Packagist](https://packagist.org/packages/ht2/couple)[ RSS](/packages/ht2-couple/feed)WikiDiscussions master Synced 1mo ago

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

Couple
======

[](#couple)

> Port of [ryansmith94/couple](https://github.com/ryansmith94/couple) from JS to PHP. A library for coupling two objects together. This is useful for nested pattern matching.

[![Build Status](https://camo.githubusercontent.com/6f2f6f32edeadefa8381cd0ae79355a2e2ec2592fd7832ec6aee8b984bc95b6a/68747470733a2f2f7472617669732d63692e6f72672f6874322f636f75706c652e737667)](https://travis-ci.org/ht2/couple)[![Latest Stable Version](https://camo.githubusercontent.com/81857268bb8bb9b0df27efa99b828903d4b1ae89638964b238cc05f93105b8a5/68747470733a2f2f706f7365722e707567782e6f72672f6874322f636f75706c652f762f737461626c652e737667)](https://packagist.org/packages/ht2/couple)[![Total Downloads](https://camo.githubusercontent.com/4afd8c4a1328212aca0ddddf37c8a1b7148a18b50a71f4075e0fd104e847aedd/68747470733a2f2f706f7365722e707567782e6f72672f6874322f636f75706c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/ht2/couple)[![License](https://camo.githubusercontent.com/e2caa200e3140cba17d8c3724bf29124b8b9077dbfffbac589476652ac7f0185/68747470733a2f2f706f7365722e707567782e6f72672f6874322f636f75706c652f6c6963656e73652e737667)](https://packagist.org/packages/ht2/couple)[!\[Gitter\](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/ht2/couple?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

If you have a bug, enhancement, or question you can post it in the [issues](/issues), however, please see the [guidelines](/contributing.md) before doing so. You may also ask questions and chat on [Gitter](https://gitter.im/ht2/couple).

Users
-----

[](#users)

Documentation can be found in the [docs](/docs) directory. Install using `composer require ht2/couple`.

Developers
----------

[](#developers)

You may contribute to this project via [issues](/issues) and [pull request](/pulls), however, please see the [guidelines](/contributing.md) before doing so.

### Getting Started

[](#getting-started)

1. [Fork](/fork) the repository.
2. Clone your forked version of the repository.
3. Run `composer install`.
4. Change the code.
5. See [Testing](#testing) below for more information.
6. Repeat from Step 4 or continue to step 7.
7. Commit and push your changes to Github.
8. Create a [pull request](/pulls) on Github (ensuring that you follow the [guidelines](/contributing.md)).

### Directory Structure

[](#directory-structure)

- [src](/src) - Source code written in PHP.
- [tests](/tests) - Testing code written in PHP.
- [docs](/docs) - Documentation written in "Github Flavoured Markdown".

### Testing

[](#testing)

You should try to ensure that `./vendor/bin/phpunit tests` runs without any errors before submitting a pull request.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~0 days

Total

2

Last Release

4238d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/715482c571ea46ac89ed717d40d7067b66282bf8d67c34f5ba59d41e61543a24?d=identicon)[ryansmith94](/maintainers/ryansmith94)

---

Top Contributors

[![ryasmi](https://avatars.githubusercontent.com/u/3045513?v=4)](https://github.com/ryasmi "ryasmi (51 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ht2-couple/health.svg)

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

PHPackages © 2026

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