PHPackages                             cmgmyr/title-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. cmgmyr/title-formatter

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

cmgmyr/title-formatter
======================

A simple to use text formatter, primarily used for page/blog titles

3.0.0(4y ago)45762[2 PRs](https://github.com/cmgmyr/title-formatter/pulls)MITPHPPHP ^8.0

Since Apr 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cmgmyr/title-formatter)[ Packagist](https://packagist.org/packages/cmgmyr/title-formatter)[ GitHub Sponsors](https://github.com/cmgmyr)[ RSS](/packages/cmgmyr-title-formatter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

[![Tests](https://github.com/cmgmyr/title-formatter/actions/workflows/run-tests.yml/badge.svg)](https://github.com/cmgmyr/title-formatter/actions/workflows/run-tests.yml)[![Latest Version](https://camo.githubusercontent.com/f141d09c39c92770875536947dd3f5f0f60bbedb5527afcf220af4c365a1e94a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636d676d79722f7469746c652d666f726d61747465722e737667)](https://github.com/cmgmyr/title-formatter/releases)[![Total Downloads](https://camo.githubusercontent.com/00c01238d2cd7b1a9f362cead7a9a433aa8b34f3fe15bc58b2703cf437906d50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636d676d79722f7469746c652d666f726d61747465722e737667)](https://packagist.org/packages/cmgmyr/title-formatter)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

Title Text Formatter
====================

[](#title-text-formatter)

A simple to use text formatter, primarily used for page/blog titles.

Install
-------

[](#install)

Via Composer

```
"require": {
    "cmgmyr/title-formatter": "~3.0"
}

```

Usage
-----

[](#usage)

```
use Cmgmyr\TitleFormatter\TitleFormatter;

$title = "this is a messy title. [can you fix it?]";
$title = TitleFormatter::titleCase($title);
echo $title; // This is a Messy Title. [Can You Fix It?]
```

Formatting "Rules"
------------------

[](#formatting-rules)

1. First word in a sentence is capitalized
2. Last word in a sentence is capitalized
3. Words within brackets (or similar) are capitalized, similar to rules #1 &amp; #2
4. Words within the `$ignoredWords` array should not be capitalized as long as it doesn't conflict with rules #1-#3
5. Words preceded by multiple special characters should be capitalized: $$$Money
6. All dashed words should be capitalized: Super-Awesome-Post
7. Ignore words that already include at least one uppercase letter. We'll assume that the author knows what they're doing: eBay, iPad, McCormick, etc

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Chris Gmyr](https://github.com/cmgmyr)
- [All Contributors](../../contributors)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

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

Total

4

Last Release

1640d ago

Major Versions

1.0.1 → 2.02019-04-29

2.0 → 3.0.02021-11-20

PHP version history (3 changes)1.0PHP &gt;=5.4.0

2.0PHP ~7.1

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d987f3caa2f921deded28dc8cf4a6f8ecb6cd6acf79ebd5f7d6191835ba7f1a?d=identicon)[cmgmyr](/maintainers/cmgmyr)

---

Top Contributors

[![cmgmyr](https://avatars.githubusercontent.com/u/4693481?v=4)](https://github.com/cmgmyr "cmgmyr (40 commits)")

---

Tags

composercomposer-packagehacktoberfestpackagephp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cmgmyr-title-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/cmgmyr-title-formatter/health.svg)](https://phpackages.com/packages/cmgmyr-title-formatter)
```

###  Alternatives

[spomky-labs/cbor-php

CBOR Encoder/Decoder for PHP

596.4M30](/packages/spomky-labs-cbor-php)[cleaniquecoders/traitify

Traitify is a Laravel package designed to streamline and enhance your development process by providing a collection of reusable traits and contracts.

199.2k22](/packages/cleaniquecoders-traitify)

PHPackages © 2026

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