Answers.Body: <p>Using the Drupal standards in your IDE ought to get you most of the way. For fine-tuning you can see <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation" rel="nofollow">https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation</a> and also try out the <code>civilint</code> cli tool which is shipped with buildkit.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-14T20:25:03.563Z
Answers.Text: Beat me to it by a few seconds. Will also mention that at last check buildkit didn't work on windows but can see the code for it on github. Also I think your link is old. See https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-14T20:19:25.833Z
Answers.LastActivityDate: 2016-09-14T22:49:05.940Z
Answers.LastEditDate: 2016-09-14T22:49:05.940Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>For IDE purposes, look at <a href="https://github.com/civicrm/coder/">https://github.com/civicrm/coder/</a></p>
  
  <p>This is a fork of drupal/coder which relaxes a number of conditions. (The coding practices in Civi differed from Drupal in some non-cosmetic ways -- changing them would break functional backward-compatibility.)</p>
  
  <p>This is the same rule-set used by <code>civilint</code>, which is the script that runs the <code>civicrm.org</code> test bot (Github/Jenkins).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-20T23:31:14.053Z
Answers.Text: Tim, this is really cool! (In theory, anyway -- I haven't actually tried to use it yet, as I've already configured my IDE per the link in Coleman's answer.) I think this tool deserves a mention on said wiki page... or maybe it obviates the need for this page in the first place?
Answers.UserDisplayName: universalhandle
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-15T06:37:20.460Z
Answers.LastActivityDate: 2016-09-15T06:37:20.460Z
Answers.UserDisplayName: Tim Otten
Body: <p>I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code.  Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards.  I've installed PHP Code Sniffer and the Drupal standard from Coder - see <a href="https://www.drupal.org/node/1420008">https://www.drupal.org/node/1420008</a>, but even when applied to 'vanilla' CiviCRM code throws a number of standards violations, particularly around the way comments are entered.  Has anyone got any comments/thoughts?</p>
  
Tags: <developer><php>
Title: Are there up-to-date CiviCRM coding standards available?
ThreadText: # Are there up-to-date CiviCRM coding standards available?
  
  (Asked by: username_0 on 2016-09-14)
  
  I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code. Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards. I've installed PHP Code Sniffer and the Drupal standard from Coder - see <https://www.drupal.org/node/1420008>, but even when applied to 'vanilla' CiviCRM code throws a number of standards violations, particularly around the way comments are entered. Has anyone got any comments/thoughts?
  
  **Tags:** developer, php
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-09-14. Score: 6
  
  Using the Drupal standards in your IDE ought to get you most of the way. For fine-tuning you can see <https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation> and also try out the `civilint` cli tool which is shipped with buildkit.
  
  > **Comments:**
  > **username_2**: Beat me to it by a few seconds. Will also mention that at last check buildkit didn't work on windows but can see the code for it on github. Also I think your link is old. See https://wiki.civicrm.org/confluence/display/CRMDOC/PHP+Code+and+Inline+Documentation  
  
  ---
  
  ### Answer by username_3 on 2016-09-15. Score: 5
  
  For IDE purposes, look at <https://github.com/civicrm/coder/>
  
  This is a fork of drupal/coder which relaxes a number of conditions. (The coding practices in Civi differed from Drupal in some non-cosmetic ways -- changing them would break functional backward-compatibility.)
  
  This is the same rule-set used by `civilint`, which is the script that runs the `civicrm.org` test bot (Github/Jenkins).
  
  > **Comments:**
  > **username_4**: Tim, this is really cool! (In theory, anyway -- I haven't actually tried to use it yet, as I've already configured my IDE per the link in username_1's answer.) I think this tool deserves a mention on said wiki page... or maybe it obviates the need for this page in the first place?  
  
  ---
  
  