PHPackages                             brightfish/bf-text-formatter - 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. brightfish/bf-text-formatter

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

brightfish/bf-text-formatter
============================

Format text the Brightfish way

1.0.9(9mo ago)1102[3 PRs](https://github.com/brightfish-be/BfTextFormatter/pulls)MITPHPPHP ^8.2CI passing

Since Apr 3Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/brightfish-be/BfTextFormatter)[ Packagist](https://packagist.org/packages/brightfish/bf-text-formatter)[ Docs](https://github.com/brightfish-be/BfTextFormatter)[ GitHub Sponsors](https://github.com/brightfish)[ RSS](/packages/brightfish-bf-text-formatter/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (3)Versions (26)Used By (0)

Format text the Brightfish way
==============================

[](#format-text-the-brightfish-way)

[![Tests](https://github.com/brightfish-be/TextFormatter/actions/workflows/run-tests.yml/badge.svg)](https://github.com/brightfish-be/TextFormatter/actions/workflows/run-tests.yml)

```
├── BaseFormatter.php
├── CampaignNameFormatter.php
├── CinemaNameFormatter.php
├── CompanyNameFormatter.php
├── CountryNameFormatter.php
├── MovieTitleFormatter.php
├── PersonNameFormatter.php
└── VatNumberFormatter.php

```

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

[](#installation)

You can install the package via composer:

```
composer require brightfish/bf-text-formatter
```

Usage
-----

[](#usage)

### BaseFormatter

[](#baseformatter)

```
// generic text formatter
use Brightfish\TextFormatter\BaseFormatter;

$formatter = new BaseFormatter;
$formatter->uppercaseWords(['cia', 'fbi', 'nsa']);
$formatter->lowercaseWords(['in', 'a', 'the']);
$formatter->removeWords(['draft', 'void', 'obsolete']);
$result = $formatter->clean("The dog in the house"); // the Dog in the House

$formatter = (new BaseFormatter)->setForceTransliterate(true);
```

### CampaignNameFormatter

[](#campaignnameformatter)

```
use Brightfish\TextFormatter\CampaignNameFormatter;

$formatter = new CampaignNameFormatter();
```

### CinemaNameFormatter

[](#cinemanameformatter)

```
use Brightfish\TextFormatter\CinemaNameFormatter;

$formatter = new CinemaNameFormatter();
$result = $formatter->format("pathe charleroi");    // Pathé Charleroi
```

### CompanyNameFormatter

[](#companynameformatter)

```
use Brightfish\TextFormatter\CompanyNameFormatter;

$formatter = new CompanyNameFormatter();
```

### MovieTitleFormatter

[](#movietitleformatter)

```
use Brightfish\TextFormatter\MovieTitleFormatter;

$formatter = new MovieTitleFormatter();
```

### PersonNameFormatter

[](#personnameformatter)

```
use Brightfish\TextFormatter\PersonNameFormatter;

$formatter = new PersonNameFormatter();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Peter Forret @ BF](https://github.com/brightfish)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance65

Regular maintenance activity

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% 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 ~8 days

Recently: every ~42 days

Total

22

Last Release

273d ago

Major Versions

0.3.0 → 1.0.02025-04-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/337ba8a7b95f42ae856defba4b85180291c8d12c33eb99011ccb9d58294e2be7?d=identicon)[brightfish](/maintainers/brightfish)

---

Top Contributors

[![cinemapub](https://avatars.githubusercontent.com/u/1841829?v=4)](https://github.com/cinemapub "cinemapub (56 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

formattingtextbrightfishtextformatter

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/brightfish-bf-text-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/brightfish-bf-text-formatter/health.svg)](https://phpackages.com/packages/brightfish-bf-text-formatter)
```

###  Alternatives

[devsrv/livewire-modal

turn laravel livewire component into modal

138.2k](/packages/devsrv-livewire-modal)

PHPackages © 2026

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