PHPackages                             khalyomede/php-typo - 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. [CLI &amp; Console](/categories/cli)
4. /
5. khalyomede/php-typo

ActiveLibrary[CLI &amp; Console](/categories/cli)

khalyomede/php-typo
===================

A command line tool to validate files do not have English typo in variables, methods, functions, ...

0.4.0(2y ago)07[1 issues](https://github.com/khalyomede/php-typo/issues)MITPHPPHP &gt;=8.2.0

Since Aug 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/khalyomede/php-typo)[ Packagist](https://packagist.org/packages/khalyomede/php-typo)[ RSS](/packages/khalyomede-php-typo/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

php-typo/php-typo
=================

[](#php-typophp-typo)

A command line tool to validate files do not have English typo in variables, methods, functions, ...

Summary
-------

[](#summary)

- [About](#about)
- [Installation](#installation)
- [Examples](#examples)
- [Tests](#tests)

About
-----

[](#about)

I searched for a tool to correct english typos across a code base, but only ended up finding VSCode plugins. I know there is PHPStorm plugins as well (and probably similar tools on others code editors), but I need a single, unique way to correct my english typos so that other contributors to my code base will also have the same results, and do not need to install anything on their editor.

English words list based on [dwyl/english-words](https://github.com/dwyl/english-words).

Features
--------

[](#features)

- Validates your code do not have typos in
    - class names and their properties, methods and their parameters
    - interfaces names
    - enum names and their cases
    - variables names
    - function names and their parameters
    - constants and class constants
- Shipped with a list of known english words for fast quick start
- Dead simple way to ignore/whitelist additional words

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

[](#installation)

On your root folder, on the terminal type this command:

```
./vendor/bin/php-typo init
```

This will create a file `php-typo.json` at the root of your folder with the following content:

```
{
  "include": [
    "src"
  ],
  "exclude": [],
  "whitelist": [
    "vendor/khalyomede/php-typo/src/words/english.json"
  ]
}
```

Examples
--------

[](#examples)

- [1. Run your first check](#1-run-your-first-check)
- [2. Add more words/whitelist words](#2-add-more-words-whitelist-words)

### 1. Run your first check

[](#1-run-your-first-check)

In this example, we will just run the command, which by default will search on the files you specified in your "php-typo.json" config file.

We will assume we have the following file content in "src/index.php":

```
require __DIR__ . "/../vendor/autoload.php";

$gretingMessage = "Hello, world";

echo $gretingMessage . PHP_EOL;
```

Run the command:

```
khalyomede@ubuntu:~/programming/php-typo$ ./vendor/bin/php-typo check

Getting config...
Config found (0.08 ms.). Getting file list...
File list found with 1 files to scan (0.26 ms.). Scanning...

public/index.php:3
  variable "gretingMessage" contains an unknown word "greting".

public/index.php:5
  variable "gretingMessage" contains an unknown word "greting".

Total typos  2
Total files  1
Time spent   125.94 ms.
Memory used  98.18 MB
```

2. Add more words/whitelist words
---------------------------------

[](#2-add-more-wordswhitelist-words)

In this example, we will use an additional list of English words to extend the base list of words shipped with this package. This is equivalent to "ignoring" some words.

In the config file at "php-typo.json", add your custom JSON word list:

```
{
  "include": [
    "src"
  ],
  "exclude": [],
  "whitelist": [
    "vendor/khalyomede/php-typo/src/words/english.json",
    "custom.json"
  ]
}
```

The list of words should be an array of strings. Here is what you could have in your file "custom.json":

```
[
  "greting",
  "php"
]
```

On the next check, the words "greting" and "php" will be counted as correct words.

Tests
-----

[](#tests)

```
composer run test
composer run analyse
composer run lint
composer run updates
composer run scan
composer run check
```

Or

```
composer run all
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

3

Last Release

901d ago

PHP version history (2 changes)0.1.0PHP &gt;=8.1.0

0.3.0PHP &gt;=8.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15908747?v=4)[Anwar](/maintainers/khalyomede)[@khalyomede](https://github.com/khalyomede)

---

Top Contributors

[![khalyomede](https://avatars.githubusercontent.com/u/15908747?v=4)](https://github.com/khalyomede "khalyomede (21 commits)")

---

Tags

command-linephpspellchecktypo

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/khalyomede-php-typo/health.svg)

```
[![Health](https://phpackages.com/badges/khalyomede-php-typo/health.svg)](https://phpackages.com/packages/khalyomede-php-typo)
```

###  Alternatives

[psy/psysh

An interactive shell for modern PHP.

9.8k545.6M719](/packages/psy-psysh)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[povils/phpmnd

A tool to detect Magic numbers in codebase

5795.6M193](/packages/povils-phpmnd)[worksome/envy

Automatically keep your .env files in sync.

6871.8M](/packages/worksome-envy)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)

PHPackages © 2026

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