Child pages
  • Development standard

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Source code lines are limited to 120 150 characters.
  2. Functions and methods lines are limited to 80 characters. Functions must have a good reason to have an overly long name: keep it to the essential!

...

You can download the PrestaShop code standard using SVNGit:http https://svngithub.prestashop.com/branchesPrestaShop/PrestaShop-norm/-validator (you must perform this step before going any further with this tutorial).

...

  1. Install PEAR: http://pear.php.net/
    $> apt-get install php-pear
  2. Install PHP CodeSniffer in PEAR: http://pear.php.net/package/PHP_CodeSniffer
    $> pear install PHP_CodeSniffer
  3. Add the PrestaShop standard that you downloaded from SVN earlier, and place it in PHP CodeSniffer's "Standards" folder.
    $> svn co httpgit clone https://svngithub.prestashop.com/branchesPrestaShop/PrestaShop-norm-validator / /usr/share/php/PHP/CodeSniffer/Standards/Prestashop
  4. Launch PHP CodeSniffer
    $> phpcs --config-set default_standard Prestashop

...