PHPackages                             nerones/codeigniter-phpcs - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. nerones/codeigniter-phpcs

ActiveLibrary[Testing &amp; Quality](/categories/testing)

nerones/codeigniter-phpcs
=========================

Rules for codeigniter

46.7k↑37.3%6[1 PRs](https://github.com/nerones/CodeIgniter-for-PHP_CodeSniffer/pulls)PHP

Since Jun 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nerones/CodeIgniter-for-PHP_CodeSniffer)[ Packagist](https://packagist.org/packages/nerones/codeigniter-phpcs)[ RSS](/packages/nerones-codeigniter-phpcs/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

CodeIgniter-for-PHP\_CodeSniffer
================================

[](#codeigniter-for-php_codesniffer)

Provides sniffs for [PHP\_CodeSniffer 1.3.0 and above](http://www.squizlabs.com/php-codesniffer) to check [CodeIgniter coding standard](http://ellislab.com/codeigniter/user-guide/general/styleguide.html).

A bit of story
--------------

[](#a-bit-of-story)

### PHP\_CodeSniffer

[](#php_codesniffer)

[PHP\_CodeSniffer](http://www.squizlabs.com/php-codesniffer) is a PHP5 script that tokenises and "sniffs" PHP, JavaScript and CSS files to detect violations of a defined coding standard.

It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers.

By default sniffs for a few coding convetions are provided like PEAR, Zend, PHPCS and Squiz. **CodeIgniter-for-PHP\_CodeSniffer** is aimed at adding support for CodeIgniter coding convention.

### CodeIgniter coding standard

[](#codeigniter-coding-standard)

[CodeIgniter](http://codeigniter.com/) is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications.

CodeIgniter is developed by EllisLab. The compagny follows some specific [coding rules](http://ellislab.com/codeigniter/user-guide/general/styleguide.html) for their developments and for CodeIgniter especially.

Based on PHP\_CodeSniffer **CodeIgniter-for-PHP\_CodeSniffer** helps to validate most of the rules in CodeIgniter coding standard.

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

[](#installation)

### With composer

[](#with-composer)

Add this to your composer.json

```
{
 "require-dev": {
   ...
   "nerones/codeigniter-phpcs": "dev-master"
   ...
 },
}
```

then run `composer install` and after that, you can use this set of rules like:

```
vendor/bin/phpcs --standard=vendor/nerones/codeigniter-phpcs/CodeIgniter/ --extensions=php src/
```

The paths used needs to be changed if you install the ruleset globaly.

### With ant

[](#with-ant)

There is an [Apache Ant](http://ant.apache.org/) script at the root of the repository. It targets standard Linux environment like Ubuntu with PHP\_CodeSniffer 1.3.0 or above installed via PEAR. It requires PHP (in its 5th version).

Just go to the root of the project and type `ant` to set up **CodeIgniter-for-PHP\_CodeSniffer**. If you have CodeSniffer installed in another directory than "/usr/share/php/PHP/CodeSniffer/" than you can pass the right directory as argument to ant. Just type `ant -Dphpcs.dir="/path/to/CodeSniffer/"`.

Check that it is installed type `phpcs -i` you should see a list of installed standards.

Then you can go to you project folder and run `phpcs --standard=CodeIgniter my-file-or-my-directory.php`.

If you work on a Windows platform or for any reason, it is easy to edit the installation script. You just need to change the property `phpcs.dir` in `build.xml` to point toward the directory containing PHP\_CodeSniffer.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 69.8% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/429848?v=4)[Nelson Efrain A. Cruz](/maintainers/nerones)[@nerones](https://github.com/nerones)

---

Top Contributors

[![thomas-ernest](https://avatars.githubusercontent.com/u/479923?v=4)](https://github.com/thomas-ernest "thomas-ernest (30 commits)")[![nerones](https://avatars.githubusercontent.com/u/429848?v=4)](https://github.com/nerones "nerones (7 commits)")[![lh84](https://avatars.githubusercontent.com/u/439332?v=4)](https://github.com/lh84 "lh84 (2 commits)")[![mukthar](https://avatars.githubusercontent.com/u/1025499?v=4)](https://github.com/mukthar "mukthar (1 commits)")[![jacksonj04](https://avatars.githubusercontent.com/u/619082?v=4)](https://github.com/jacksonj04 "jacksonj04 (1 commits)")[![p4ul](https://avatars.githubusercontent.com/u/71634?v=4)](https://github.com/p4ul "p4ul (1 commits)")[![ROunofF](https://avatars.githubusercontent.com/u/5734058?v=4)](https://github.com/ROunofF "ROunofF (1 commits)")

### Embed Badge

![Health badge](/badges/nerones-codeigniter-phpcs/health.svg)

```
[![Health](https://phpackages.com/badges/nerones-codeigniter-phpcs/health.svg)](https://phpackages.com/packages/nerones-codeigniter-phpcs)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)[gong023/assert_chain

enable you to use phpunit assert with method chain

1478.9k3](/packages/gong023-assert-chain)

PHPackages © 2026

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