PHPackages                             pandaleague/kohana-coding-standards - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. pandaleague/kohana-coding-standards

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

pandaleague/kohana-coding-standards
===================================

PHP\_CodeSniffer rules for the Kohana Framework coding style

v0.3.3(5y ago)02.0k[1 PRs](https://github.com/pandaleague/kohana-coding-standards/pulls)BSD-3-ClausePHP

Since May 27Pushed 5y agoCompare

[ Source](https://github.com/pandaleague/kohana-coding-standards)[ Packagist](https://packagist.org/packages/pandaleague/kohana-coding-standards)[ Docs](https://github.com/pandaleague/kohana-coding-standards)[ RSS](/packages/pandaleague-kohana-coding-standards/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (1)Versions (8)Used By (0)

PHP Codesniffer standard for the Kohana Framework
=================================================

[](#php-codesniffer-standard-for-the-kohana-framework)

This package contains a set of coding standard tests for the [kohana](http://kohanaframework.org) PHP framework.
The original tests were written by [Matthew Turland](http://matthewturland.com), see his [github repo](http://github.com/elazar/phpcs-kohana) for more info.

These tests are meant to be a guide and may not be 100% accurate. If you find a bug please report it on the [kohana issue tracker](http://dev.kohanaframework.org).

Requirements
------------

[](#requirements)

These tests are built for usage with [PHP Codesniffer](https://github.com/squizlabs/PHP_CodeSniffer).

Installation - Composer
-----------------------

[](#installation---composer)

Add the package to the development dependencies in your project's composer.json

```
{
    "require-dev": {
        "kohana/coding-standards": "*",
    }
}

```

Run `composer --dev update` to update your composer.lock file and install the package. The sniffs will be installed in `vendor/kohana/coding-standards` in your project root directory and the `phpcs` command will be installed to `bin/phpcs`.

Installation - Manually or with PEAR
------------------------------------

[](#installation---manually-or-with-pear)

If you want the standard to be available system wide you can symlink them into the code sniffer dir like so:

```
git clone https://github.com/kohana/coding-standards.git kohana-coding-standards
cd kohana-coding-standards
sudo ln -sfn `pwd`/Kohana `pear config-get php_dir`/PHP/CodeSniffer/Standards/Kohana
sudo ln -sfn `pwd`/test/PHP_CodeSniffer/CodeSniffer/Standards/Kohana `pear config-get test_dir`/PHP_CodeSniffer/CodeSniffer/Standards/Kohana

```

Running
-------

[](#running)

If you installed with composer, reference the standard from your vendor directory:

```
bin/phpcs --standard=vendor/kohana/coding-standards/Kohana modules/

```

Or, from a raw clone, you can simply reference the local copy:

```
phpcs --standard=path/to/coding-standards/Kohana kohana/core

```

If installed globally (symlinked into PEAR), you can reference the standard like so:

```
phpcs --standard=Kohana application/

```

Customising your project standard
---------------------------------

[](#customising-your-project-standard)

It is also possible to extend the rules in use for your project, or to include some but not all of the Kohana standards (for example, if you are working on something that is not intended as a kohana module). You do this by adding a `coding_standard.xml` to your project root which specifies which rules to include and customises any variables. See the [PHP\_CodeSniffer docs](https://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php) for more details.

Testing
-------

[](#testing)

Like all things code related, sniffs need to be tested! To run the tests they need to be in the codesniffer dir (i.e. you should run the above commands to symlink the sniffs / tests in) and you need to [patch phpcs' AllSniffs.php](http://pear.php.net/bugs/bug.php?id=17902&edit=12&patch=fix-cant-run-symlinked-tests.patch&revision=latest)

Then just run the tests like so:

```
phpunit --bootstrap=`pear config-get php_dir`/PHP/CodeSniffer.php `pear config-get test_dir`/PHP_CodeSniffer/CodeSniffer/Standards/AllSniffs.php

```

### Known issues

[](#known-issues)

- There are some problems with expressions in ternary operators

Please report any new issues to the K3 bug tracker and file it under "PHPCS Coding Standards"

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

5

Last Release

1941d ago

### Community

Maintainers

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

---

Top Contributors

[![BRMatt](https://avatars.githubusercontent.com/u/20394?v=4)](https://github.com/BRMatt "BRMatt (16 commits)")[![cbandy](https://avatars.githubusercontent.com/u/106560?v=4)](https://github.com/cbandy "cbandy (15 commits)")[![kiall](https://avatars.githubusercontent.com/u/52713?v=4)](https://github.com/kiall "kiall (10 commits)")[![gdsmith](https://avatars.githubusercontent.com/u/908695?v=4)](https://github.com/gdsmith "gdsmith (8 commits)")[![elazar](https://avatars.githubusercontent.com/u/15487?v=4)](https://github.com/elazar "elazar (4 commits)")[![mintbridge](https://avatars.githubusercontent.com/u/32777?v=4)](https://github.com/mintbridge "mintbridge (1 commits)")[![bobeagan](https://avatars.githubusercontent.com/u/100226?v=4)](https://github.com/bobeagan "bobeagan (1 commits)")[![acoulton](https://avatars.githubusercontent.com/u/416566?v=4)](https://github.com/acoulton "acoulton (1 commits)")

---

Tags

standardsphpcsCode stylekohanacode standardcoding stanards

### Embed Badge

![Health badge](/badges/pandaleague-kohana-coding-standards/health.svg)

```
[![Health](https://phpackages.com/badges/pandaleague-kohana-coding-standards/health.svg)](https://phpackages.com/packages/pandaleague-kohana-coding-standards)
```

###  Alternatives

[phpcompatibility/php-compatibility

A set of sniffs for PHP\_CodeSniffer that checks for PHP cross-version compatibility.

2.3k78.7M1.6k](/packages/phpcompatibility-php-compatibility)[automattic/vipwpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions

25810.9M179](/packages/automattic-vipwpcs)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

213777.0k30](/packages/wptrt-wpthemereview)[inpsyde/php-coding-standards

PHP 7.4+ coding standards for Syde WordPress projects.

101169.9k46](/packages/inpsyde-php-coding-standards)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.2M33](/packages/yoast-yoastcs)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17524.8k7](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

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