After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629774 - Revise PHP snippets
Revise PHP snippets
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: snippets
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-15 16:09 UTC by Renich Bon Ciric
Modified: 2014-06-27 10:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[snippets] Make PHP snippets more standard (4.38 KB, patch)
2014-04-12 16:43 UTC, jessevdk@gmail.com
committed Details | Review

Description Renich Bon Ciric 2010-09-15 16:09:49 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.
Comment 1 jessevdk@gmail.com 2014-04-12 16:43:30 UTC
Created attachment 274172 [details] [review]
[snippets] Make PHP snippets more standard
Comment 2 jessevdk@gmail.com 2014-04-13 12:29:04 UTC
Attachment 274172 [details] pushed as 73fa16e - [snippets] Make PHP snippets more standard
Comment 3 Jacob 2014-06-27 10:44:13 UTC
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.