PHPackages                             byjg/account-statements - 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. byjg/account-statements

Abandoned → [byjg/wallets](/?search=byjg%2Fwallets)Library[Utility &amp; Helpers](/categories/utility)

byjg/account-statements
=======================

Very simple component to manage Account Statements in PHP

5.0.1(1y ago)210.0k↓25.8%1[1 PRs](https://github.com/byjg/php-account-statements/pulls)MITPHPPHP &gt;=8.1 &lt;8.4CI failing

Since Jul 11Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/byjg/php-account-statements)[ Packagist](https://packagist.org/packages/byjg/account-statements)[ GitHub Sponsors](https://github.com/byjg)[ RSS](/packages/byjg-account-statements/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (4)Versions (10)Used By (0)

Basic PHP Account Statements
============================

[](#basic-php-account-statements)

[![Build Status](https://github.com/byjg/php-account-statements/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-account-statements/actions/workflows/phpunit.yml)[![Opensource ByJG](https://camo.githubusercontent.com/425c1bbccc0f292bf4d20569ae74a6b2e384fd648f1af8911bc61de9a8dcfc0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f70656e736f757263652d62796a672d737563636573732e737667)](http://opensource.byjg.com)[![GitHub source](https://camo.githubusercontent.com/88e61eb211719144efdd570290a0456b6e13099c2df8d973f1bb43fe33bf0039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769746875622d736f757263652d696e666f726d6174696f6e616c3f6c6f676f3d676974687562)](https://github.com/byjg/php-account-statements/)[![GitHub license](https://camo.githubusercontent.com/b0e950f89d1fd8fe29fff2f7d28cde4ff0b1493db577733d401e3012504554da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62796a672f7068702d6163636f756e742d73746174656d656e74732e737667)](https://opensource.byjg.com/opensource/licensing.html)[![GitHub release](https://camo.githubusercontent.com/7ccef034d077b7090dc07250e95eaa2e21865a3a6bfc815e19d7d14300fa4c00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62796a672f7068702d6163636f756e742d73746174656d656e74732e737667)](https://github.com/byjg/php-account-statements/releases/)

This is a simple PHP application that allows you to create and manage account statements. It consists of a set of classes to allow control and get statements of any account.

It supports the following features:

- Multiple accounts per user;
- Multiple currencies per account
- Transaction history to avoid changes in the balance;

How to use
----------

[](#how-to-use)

### Basic usage

[](#basic-usage)

```
use ByJG\AccountStatements\Bll\AccountBLL;
use ByJG\AccountStatements\Bll\AccountTypeBLL;
use ByJG\AccountStatements\Bll\StatementBLL;
use ByJG\AccountStatements\Entity\AccountTypeEntity;
use ByJG\AccountStatements\Repository\AccountRepository;
use ByJG\AccountStatements\Repository\AccountTypeRepository;
use ByJG\AccountStatements\Repository\StatementRepository;
use ByJG\AccountStatements\DTO\StatementDTO;

// Initiate Repositories
$accountTypeRepo = new AccountTypeRepository($this->dbDriver);
$statementRepo = new StatementRepository($this->dbDriver);
$accountRepo = new AccountRepository($this->dbDriver);

// Initiate BLLs
$accountTypeBLL = new AccountTypeBLL($accountTypeRepo);
$statementBLL = new StatementBLL($statementRepo, $accountRepo);
$accountBLL = new AccountBLL($accountRepo, $accountTypeBLL, $statementBLL);

// Create a new Account Type
$accountType = new AccountTypeEntity();
$accountType->setAccountTypeId('USD');
$accountType->setName('Dollar Account');

$accountTypeBLL = new AccountTypeBLL($accountTypeRepo);
$accountTypeBLL->update($accountType);

// Create a new Account
$accountRepo = new AccountRepository($this->dbDriver);
$accountId = $accountBLL->createAccount($accountType->getAccountTypeId(), '34', 0);

// Add 200 USD to the account
$statement = new StatementDTO($accountId, 200);
$statementBLL->addFunds($statement);

// Withdraw 100 USD from the account
$statement = new StatementDTO($accountId, 100);
$statementBLL->withdrawFunds($statement);

// Add 50 USD hold to the account
$statement = new StatementDTO($accountId, 50);
$statementId = $statementBLL->reserveFundsForDeposit($statement);

// Accept the hold
$statementBLL->acceptFundsById($statementId);
```

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

[](#installation)

```
composer require byjg/account-statements
```

Testing
-------

[](#testing)

```
docker run --name mysql-container --rm  -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql:8.0
./vendor/bin/phpunit
```

Dependencies
------------

[](#dependencies)

 ```
flowchart TD
    byjg/account-statements --> ext-openssl
    byjg/account-statements --> byjg/micro-orm
```

      Loading ---

[Open source ByJG](http://opensource.byjg.com)

@todo Documentation @todo Rest

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance49

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~235 days

Recently: every ~114 days

Total

9

Last Release

300d ago

Major Versions

1.0.1 → 4.9.02023-05-21

4.9.2 → 5.0.02024-10-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/981924?v=4)[Joao Gilberto Magalhaes](/maintainers/byjg)[@byjg](https://github.com/byjg)

---

Top Contributors

[![byjg](https://avatars.githubusercontent.com/u/981924?v=4)](https://github.com/byjg "byjg (72 commits)")[![leonardomunsa](https://avatars.githubusercontent.com/u/61881081?v=4)](https://github.com/leonardomunsa "leonardomunsa (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/byjg-account-statements/health.svg)

```
[![Health](https://phpackages.com/badges/byjg-account-statements/health.svg)](https://phpackages.com/packages/byjg-account-statements)
```

PHPackages © 2026

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