Skip to content

Change PHPCS-Pear standard to support action methods like Controller::admin_index()

Notifications You must be signed in to change notification settings

djonatanb/phpcs-pear-cakephp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

CakePHP make use of special methods in Controller classes known as actions. This framework have some own code standards and this important methods could be, by example: index, edit and admin_index or admin_view

The last of them break the PEAR standard (NamingConventions.ValidFunctionName rule) but as we realy want to use this standard without using CakePHP aliases we'll gonna break the standard

Install

you can find useful tips here. In my case (Ubuntu 10.10) standards are located in /usr/share/php/PHP/CodeSniffer/Standards (MacOs information will be welcome)

By example:

$ cd /usr/share/php/PHP/CodeSniffer/Standards
    $ git clone [email protected]/moacirosa/phpcs-pear-cakephp.git CakePHPPear

Keep the target folder (CakePHPPear) with this name to avoid problems like: "Cannot redeclare class..." check here

Example

phpcs --standard=CakePHPPear myFile.php

Issues

Yeap... I'll make these classes agree with this standard

About

Change PHPCS-Pear standard to support action methods like Controller::admin_index()

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%