brightfish / bf-text-formatter
Format text the Brightfish way
Fund package maintenance!
brightfish
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 2
pkg:composer/brightfish/bf-text-formatter
Requires
- php: ^8.2
- ext-intl: *
Requires (Dev)
- laravel/pint: ^1.0
- pestphp/pest: ^3.0
- spatie/ray: ^1.28
- dev-main
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/github_actions/actions/checkout-6
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-7
- dev-dependabot/github_actions/actions/checkout-5
This package is auto-updated.
Last update: 2025-11-24 16:54:07 UTC
README
├── BaseFormatter.php
├── CampaignNameFormatter.php
├── CinemaNameFormatter.php
├── CompanyNameFormatter.php
├── CountryNameFormatter.php
├── MovieTitleFormatter.php
├── PersonNameFormatter.php
└── VatNumberFormatter.php
Installation
You can install the package via composer:
composer require brightfish/bf-text-formatter
Usage
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
use Brightfish\TextFormatter\CampaignNameFormatter; $formatter = new CampaignNameFormatter();
CinemaNameFormatter
use Brightfish\TextFormatter\CinemaNameFormatter; $formatter = new CinemaNameFormatter(); $result = $formatter->format("pathe charleroi"); // Pathé Charleroi
CompanyNameFormatter
use Brightfish\TextFormatter\CompanyNameFormatter; $formatter = new CompanyNameFormatter();
MovieTitleFormatter
use Brightfish\TextFormatter\MovieTitleFormatter; $formatter = new MovieTitleFormatter();
PersonNameFormatter
use Brightfish\TextFormatter\PersonNameFormatter; $formatter = new PersonNameFormatter();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.