PHPackages                             tapbuy/data-scrubber - 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. tapbuy/data-scrubber

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

tapbuy/data-scrubber
====================

A tool to help with scrubbing sensitive data

1.0.0(2mo ago)12.9k↓42.3%Apache-2.0PHPPHP ^8.1

Since Apr 25Pushed 1y agoCompare

[ Source](https://github.com/tapbuy/data-scrubber)[ Packagist](https://packagist.org/packages/tapbuy/data-scrubber)[ RSS](/packages/tapbuy-data-scrubber/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (13)Used By (0)

Data Scrubber
=============

[](#data-scrubber)

PHP library for anonymizing sensitive data in objects and arrays.

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

[](#installation)

```
composer require tapbuy/data-scrubber
```

Usage
-----

[](#usage)

```
use Tapbuy\DataScrubber\Anonymizer;

$anonymizer = new Anonymizer('https://your-api-url.com/keys');

$data = [
    'name' => 'John Doe',
    'email' => 'john@example.com',
    'phonenumber' => [
        'ssn' => '123-45-6789'
    ]
];

$anonymized = $anonymizer->anonymizeObject($data);
```

API
---

[](#api)

### Anonymizer Class

[](#anonymizer-class)

```
class Anonymizer {
    public function __construct(string $url);
    public function updateKeys(): void;
    public function anonymizeObject(object|array $data): object|array;
}
```

### Keys Class

[](#keys-class)

```
class Keys {
    public function __construct(string $url);
    public function fetchKeys(): void;
    public function getKeys(): array;
}
```

Keys Format
-----------

[](#keys-format)

Your API endpoint must return:

```
{
    "success": true,
    "data": ["name", "email", "ssn", "numbers[]"]
}
```

Keys with `[]` suffix indicate array fields that should have all elements anonymized.

Anonymization Rules
-------------------

[](#anonymization-rules)

- Strings: Replaced with `*` of same length

    ```
    "John Doe" → "********"
    ```
- Numbers: Random number of same length/type

    ```
    12345 → 98765
    123.45 → 987.65
    ```
- Arrays: If key marked with \[\], all elements anonymized

    ```
    'numbers' => [123, 456] → [789, 012]
    ```

CLI
---

[](#cli)

Update keys via command line:

```
php bin/updateKeys.php https://your-api-url.com/keys
```

Directory Structure
-------------------

[](#directory-structure)

```
data-scrubber/
├── src/
│   ├── Anonymizer.php
│   └── Keys.php
├── bin/
│   └── updateKeys.php
└── composer.json

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance65

Regular maintenance activity

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Recently: every ~105 days

Total

11

Last Release

60d ago

Major Versions

0.7.3 → 1.0.02026-03-19

PHP version history (2 changes)0.1PHP &gt;=8.1

1.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0740544e5d3c7a2192d15c1cca624832e271924f3b7135183a5815216c28560b?d=identicon)[jerome-tapbuy](/maintainers/jerome-tapbuy)

![](https://www.gravatar.com/avatar/f193163becacc7142aebf5cdcddf3c47d3c66c9476e2cbcc53e38ffb46b3561f?d=identicon)[valentin\_tapbuy](/maintainers/valentin_tapbuy)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tapbuy-data-scrubber/health.svg)

```
[![Health](https://phpackages.com/badges/tapbuy-data-scrubber/health.svg)](https://phpackages.com/packages/tapbuy-data-scrubber)
```

###  Alternatives

[simple-updates/phpwhois

This package contains a Whois (RFC954) library for PHP. It allows a PHP program to create a Whois object, and obtain the output of a whois query with the Lookup function.

251.4k](/packages/simple-updates-phpwhois)

PHPackages © 2026

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