PHPackages                             harmakit/credit-manager - 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. harmakit/credit-manager

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

harmakit/credit-manager
=======================

Management tool for credits-per-minute limited services

00PHP

Since Feb 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/harmakit/credit-manager)[ Packagist](https://packagist.org/packages/harmakit/credit-manager)[ RSS](/packages/harmakit-credit-manager/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

credit-manager
==============

[](#credit-manager)

Simple library for tracking and calling credit-per-minute limited services using predis/predis

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

[](#installation)

```
composer require harmakit/credit-manager
```

Usage
-----

[](#usage)

Inherit your class, which calls some credit-per-minute limited function, from `CreditPerMinuteLimitedObject` interface.

```
class SomeLimitedExecutor implements CreditPerMinuteLimitedObject
{
    private CreditManager $creditManager;

    public function __construct(CreditManager $creditManager) {
        $this->creditManager = $creditManager;
        $this->creditManager->addResource($this); // Call this to add your class object to the CreditManager's list of services
    }

    public function __destruct()
    {
        $this->creditManager->removeResource($this);
    }

    public function getCreditsPerMinuteLimit(): int
    {
        return 100; // Your value of credits which are allowed to spend over 1 minute
    }
}
```

Now you are ready to manage your calls!

```
public function callSomething($callCost = 25): void
{
    $this->creditManager->spendCredits($this, $callCost); // Call this method when you want to spend credits
    // CreditManager will wait using sleep() function to accumulate enough credits to perform required call cost if needed
    doCallSomething();
}
```

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/78f87a972c70f7abcb2bf350a832915d10cf111668f887b22c6c0a9280862f65?d=identicon)[harmakit](/maintainers/harmakit)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/harmakit-credit-manager/health.svg)

```
[![Health](https://phpackages.com/badges/harmakit-credit-manager/health.svg)](https://phpackages.com/packages/harmakit-credit-manager)
```

###  Alternatives

[johnbillion/args

I don't want to get into an argument about this.

1181.2M16](/packages/johnbillion-args)[yuanchao/laravel-5-markdown-editor

Based on the markdown editor laravel 5

2425.5k](/packages/yuanchao-laravel-5-markdown-editor)[sivka/paginator

bootstrap-4 fork of jasongrimes/php-paginator, a lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr. The 'first' and 'last' page links are shown inline as page numbers, and excess page numbers are replaced by ellipses.

141.4k](/packages/sivka-paginator)

PHPackages © 2026

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