Skip to content

jakoch/Goldstandard-for-PHP

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

About

A PHP CodeSniffer ruleset known as "Koch's Goldstandard for PHP".

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages