Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A PHP CodeSniffer ruleset known as "Koch's Goldstandard for PHP".
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CodeSniffer/Standards/Goldstandard
.gitignore
.php_cs
.travis.yml
composer.json
readme.asciidoc

readme.asciidoc

Koch’s Goldstandard for PHP - A Coding Standard

This repository contains a set of code sniffs for PHP_CodeSniffer. Build Status

This standard enforces:

  • PSR-0, PSR-1 and PSR-2. The standards were approved by the PHP Framework Interoperability Group.

  • the removal of old and deprecated PHP functions (This is helpful, when working with legacy code.)

  • the usage of faster functions. Which in fact are premature or micro optimizations. Uh, oh! That’s BAD for sure :)

Requirements

PHP 5.3+

Installation

  • PHP_CodeSniffer is installed via Composer

  • Clone this repository

  • Create a symlink PHP/CodeSniffer/Standards/Goldstandard pointing to the Goldstandard directory

    • ln -s [somewhere]/PHP/CodeSniffer/Standards/Goldstandard /Goldstandard

Usage

  • Use the coding standard with phpcs --standard=Goldstandard

  • You might also set it as default standard phpcs --config-set default_standard Goldstandard

  • If you didn’t symlink or install it, then reference it by path phpcs --standard=path/to/Goldstandard path/to/code

IDE Integration

NetBeans

http://plugins.netbeans.org/plugin/40282/phpmd-php-codesniffer-plugin

PHPStorm

http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html

Zend Studio

http://files.zend.com/help/Zend-Studio/content/working_with_php_codesniffer.htm
Something went wrong with that request. Please try again.