PHPackages                             tysonandre/phantypocheck - 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. tysonandre/phantypocheck

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

tysonandre/phantypocheck
========================

A plugin for Phan that checks for typos (using codespell's dictionary).

1.1.2(6y ago)74.9k↓50%[10 issues](https://github.com/TysonAndre/PhanTypoCheck/issues)GPL-3.0-or-laterPHPPHP &gt;=7.1

Since Mar 25Pushed 4y ago2 watchersCompare

[ Source](https://github.com/TysonAndre/PhanTypoCheck)[ Packagist](https://packagist.org/packages/tysonandre/phantypocheck)[ RSS](/packages/tysonandre-phantypocheck/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (24)Used By (0)

PhanTypoCheck
=============

[](#phantypocheck)

[![Build Status](https://camo.githubusercontent.com/dcf504d09767d4621e390710afaccd5161cf6bcdc094080cf5a3837556b49779/68747470733a2f2f7472617669732d63692e6f72672f5479736f6e416e6472652f5068616e5479706f436865636b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/TysonAndre/PhanTypoCheck)[![Latest Stable Version](https://camo.githubusercontent.com/04fa38d0e01a540ed43554d64da5ca8d74a3a38182570b10c59b3761c151057f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7479736f6e616e6472652f7068616e7479706f636865636b2e737667)](https://packagist.org/packages/tysonandre/phantypocheck)[![License](https://camo.githubusercontent.com/d4dd50ae689692af8f229c7a9d901c0a1f50e996f8f9fc58b490bbd1407bafba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7479736f6e616e6472652f7068616e7479706f636865636b2e737667)](https://github.com/tysonandre/phantypocheck/blob/master/LICENSE)

This Phan plugin checks for typos in PHP files, with low false positives.

It checks all string literals, inline html, and doc comments (on by default). It also checks variables, element names, and element usages (using heuristics to guess individual words of `camelCase` or `snake_case` identifiers).

This also emits warnings if strings with typos are passed to calls to `gettext()`, `_()`, and `ngettext()`.

Installing
----------

[](#installing)

This can be installed with composer

```
composer require --dev tysonandre/phantypocheck

```

After it is installed, add the relative path to `TypoCheckPlugin.php` to the plugins section of `.phan/config.php`, e.g.

```
    'plugins' => [
       // other plugins,
       'vendor/tysonandre/phantypocheck/src/TypoCheckPlugin.php',
    ],
```

This can also be manually downloaded (the current version doesn't have external dependencies).

Running (standalone)
--------------------

[](#running-standalone)

This can be run as `vendor/bin/phptypocheck path/to/file.php path/to/folder`.

When passed a folder name, this will check for `.php` files within that folder, recursively.

Details
-------

[](#details)

The typo checks use [dictionary.txt](https://github.com/codespell-project/codespell/blob/master/codespell_lib/data/dictionary.txt) from

- It might be easier to just use codespell, depending on the use case.

    However, that would not tell you what type of identifier the string occurred in (and allow filtering by that).

    `codespell` also has issues analyzing the start/end of single quoted strings.

Options
-------

[](#options)

Options can be passed in your `.phan/config.php`.

```
    'plugin_config' => [
        // can provide a path to a file with a list of typos to not warn about (case insensitive)
        // See tests/phantypocheck_ignore.txt for an example file.
        'typo_check_ignore_words_file' => 'phantypocheck_ignore.txt'

        // can be added to Phan configuration to make this skip checking comments, strings, and inline HTML for typos.
        // (will *only* check uses of gettext()/_()/ngettext())
        'typo_check_comments_and_strings' => false,
    ],
```

License
-------

[](#license)

dictionary.txt is a derived work of English Wikipedia and is released under the Creative Commons Attribution-Share-Alike License 3.0 (according to )

---

PhanTypoCheck is available under the GPL v3 License (see [LICENSE](./LICENSE))

```
PhanTypoCheck is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PhanTypoCheck is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PhanTypoCheck.  If not, see .

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Recently: every ~39 days

Total

13

Last Release

2244d ago

Major Versions

0.0.4 → v1.x-dev2019-04-04

v1.x-dev → v2.x-dev2019-05-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffb9e612975be17e9ed477553358f2ced14a904b1031305ad4da55bb3861b332?d=identicon)[TysonAndre](/maintainers/TysonAndre)

---

Top Contributors

[![TysonAndre](https://avatars.githubusercontent.com/u/1904430?v=4)](https://github.com/TysonAndre "TysonAndre (42 commits)")

---

Tags

codespellphanphan-pluginphptypogettexttypophanphan-plugincodespell

### Embed Badge

![Health badge](/badges/tysonandre-phantypocheck/health.svg)

```
[![Health](https://phpackages.com/badges/tysonandre-phantypocheck/health.svg)](https://phpackages.com/packages/tysonandre-phantypocheck)
```

###  Alternatives

[akh/typograf

Типография текста

1925.3k2](/packages/akh-typograf)[cweagans/composer-configurable-plugin

Provides a lightweight configuration system for Composer plugins.

101.9M2](/packages/cweagans-composer-configurable-plugin)

PHPackages © 2026

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