Invenzzia »

IMPORTANT ANNOUNCEMENT

Due to the uncertain status of the Flyspray project, lack of new releases and moving the code repository to Github, we decided to shutdown this issue tracker by the end of January 2011. From that date, the bugs should be reported directly in Github project repositories.

List of repositories:

Open Power Template 2.x family

PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!

Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
Tasklist

FS#137 - Coding style

Attached to Project: Open Power Template
Opened by Przemek (cojack) - Friday, 13 November 2009, 12:20 GMT-8
Last edited by Zyx (Zyx) - Sunday, 31 October 2010, 13:28 GMT-8
Task Type Feature Request
Category Documentation
Status Closed
Assigned To Zyx (Zyx)
Operating System OS-independent
Severity Very Low
Priority Normal
Reported Version 2.0.2
Due in Version 2.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The coding style is horrible, few classes in to on file, interferaces. None phpdoc for classes variables.

I know it's very low prority request, and I know there is a manual for the app, but...


Regards.
This task depends upon

Closed by  Zyx (Zyx)
Sunday, 31 October 2010, 13:28 GMT-8
Reason for closing:  Outdated
Additional comments about closing:  In OPT 2.1 the coding style has been greatly improved, the bigger API clean-up is planned for OPT 3.0.
Comment by Zyx (Zyx) - Wednesday, 18 November 2009, 22:57 GMT-8
1. I don't know what do you mean by "horrible coding style". I (and many other people) think it is one of the better ones. There are some small issues that need to be corrected but they are successfully corrected.

2. Few classes into a file -> it only happens for /Opx/Class.php and Opx/Exception.php and it is an indented step due to optimization purposes. /Opx/Class.php file contains the most critical classes and interfaces that usually HAVE TO be loaded, if you want to use the library and I don't see a point in slowing down the loading process just to make them separate. When it comes to exceptions, there are lots of them. Creating 70 files for each exception is a nonsense, if the exception class actually contains no implementation, but just an error message. Won't reimplement.

3. phpdoc -> it is being corrected in OPT 2.1-trunk.
Comment by Przemek (cojack) - Sunday, 06 June 2010, 06:31 GMT-8
Public functions are named with prefix "_" why? This prefix is reserved for protected and private functions, look at pear code standard for php. Some time you named the variable in lower style, like: whereto, orther camelStyle. Chose one, mixed style is that what Im talking about "horrible coding style". Also how do set name for variables is a mistake, $old, $a - some array, $ok etc.. I see at last you add phpdoc to the php code, its fine. I'll don't nible phpdoc (but not all it's ok with it).

Loading...