rodrisan / php-standards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual Chefs PHP Standards

## Coding Standards

For all projects, developers should follow PSR-0, PSR-1, PSR-2 coding standards.

### IDE Configuration Settings

In this repository you will find a .editorconfig file. This helps standardize your IDE to what is suggested by this document.

To use this file:

  1. put it in the root of your project.
  2. Get the plugin for your IDE: editorconfig.org
### Special Cases

When working on ExpressionEngine or CodeIgniter projects, developers should follow the class and method naming conventions specified by the framework, for compatibility reasons.

### Namespaces

All standalone classes should be namespaced for better compatibility and packaging. For ease of writing, the VC namespace should be used, or alternatively VisualChefs if the first is not available. Secondary namespaces are encouraged, in order to better organize code into modules or packages (example: VC\Logger\Logger, VC\Logger\Handler).

## Documentation Standards ### Class Declaration
    /**
     * desc
     *
     * @author
     * @copyright   (C) 2013. All rights reserved.
     * @version     1.0
     */

    /**
     * desc
     *
     * @category
     * @package
     * @subpackage
     * @since       1.0
     */
   class MyClass
### Class Properties
	/**
     * My awesome var does the following thing.
     *
     * @var     boolean
     * @scope   protected
     */
   protected $my_awesome_var;
### Class Method
    /**
     *
     *
     * @param   string   $my_var    A concise description of my_var
     * @return  boolean
     * @access  public
     * @static
     */
    public static function myMethod($my_var = 'hello world')
## Vetted Libraries/Packages

Debugging

Email

Geographic

  • Geotools comprehensive set of geographic tools.

HTTP

  • Guzzle is a PHP HTTP client & framework.

Logging

  • Monolog sends your logs to files, sockets, inboxes, databases and various web services.

Markdown

Templating

## Useful Resources

@TODO more to come

About