GNOME Bugzilla – Bug 629774
Revise PHP snippets
Last modified: 2014-06-27 10:44:13 UTC
Original Bug: https://bugzilla.redhat.com/show_bug.cgi?id=633630 The PHP snippets don't follow nor Pear Coding Standard nor ZendFramework's Coding Standard. Also, documentation on snippet functions and classes should be revised. Version-Release number of selected component (if applicable): all How reproducible: Check the Tools>Manage snippets>PHP section Actual results: The snippets follow no coding standard from official PHP channels Expected results: They snippets should be following some Coding Standard. IMHO, ZendFramework's or Pear's Additional info: These two coding standards come from projects very close to PHP. Most IDEs in Fedora (NetBeans and Eclipse) follow it. Also, when generating a class, the documentation (comments above) should follow phpdoc's standard; which is the one followed by Eclipse.
Created attachment 274172 [details] [review] [snippets] Make PHP snippets more standard
Attachment 274172 [details] pushed as 73fa16e - [snippets] Make PHP snippets more standard
This patch causes bugs, see: https://bugzilla.gnome.org/show_bug.cgi?id=732268 Tab widths 2 and 8, as well as the "Use Spaces" option are all ignored, making them essentially useless yet still available in the GUI. The code inserted by Snippets will more than likely not match the code typed manually, which is in my opinion a bigger problem than Snippets not using 4 space indentation by default. Users *can* simply select tab width 4 and check "Use Spaces" to get PSR-0/4-style indentation, but forcing a specific "coding standard" on users of a dynamically typed language is ridiculous and wrong.