PHPackages                             chiroruxx/php-scope-function - 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. chiroruxx/php-scope-function

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

chiroruxx/php-scope-function
============================

Scope functions for PHP.

0.1(4y ago)02MITPHP

Since Sep 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/chiroruxx/php-scope-function)[ Packagist](https://packagist.org/packages/chiroruxx/php-scope-function)[ RSS](/packages/chiroruxx-php-scope-function/feed)WikiDiscussions master Synced 5d ago

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

Scope functions for PHP
=======================

[](#scope-functions-for-php)

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

[](#installation)

```
composer require chiroruxx/php-scope-function

```

Usage
-----

[](#usage)

```
class User
{
    use \Chiroruxx\ScopeFunction\ScopeFunction;

    // ...
}
```

### let

[](#let)

```
$user = User::find($id);
$json = $user?->let(function (User $it): string {
    $formatter = new UserFormatter();
    return $formatter->formatToJson($it);
});

return $json ?? '';
```

### also

[](#also)

```
$user->also(function (User $it): void {
    $it->created_at = new DateTime();
    $it->updated_at = new DateTime();
})
    ->save();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

1691d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c41456a9ca7fd951cbbc2ebea2d6c6d203d4342b12cd3625d06a09e35132e0c?d=identicon)[chiroruxx](/maintainers/chiroruxx)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chiroruxx-php-scope-function/health.svg)

```
[![Health](https://phpackages.com/badges/chiroruxx-php-scope-function/health.svg)](https://phpackages.com/packages/chiroruxx-php-scope-function)
```

PHPackages © 2026

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