Task #3125
Apply TYPO3 coding conventions
| Status: | Closed | Start date: | 2009-04-17 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | Code and Architecture | |||
| Target version: | Stable v1.0 | |||
| Votes: | 0 |
Description
We should try to make the code be conform with the coding guidelines as much as possible.
The main tasks will include string handling (single quotes and spaces when concating string) and comments.
I don't think that it is useful to change file names, class names and the extension's architecture to the suggested way in the guidelines because it's just not suitable for this extension.
If nobody is against it, I will reformat the code next week while I integrate the new controller.
Associated revisions
[Bug 3125] Tweak the RealURL configuration, r=niels
History
Updated by Joh. Feustel about 4 years ago
+1
Tried this already in my patches.
Updated by Reinhard Führicht about 4 years ago
- % Done changed from 0 to 70
Did first steps refactoring string concatinations, method parameters and eliminating double quotes if possible.
Updated by Fabien Udriot about 4 years ago
Well, IMHO, we should rather go in the v5 direction as the extension relies on bricks from FLOW3 (gimmefive and eventually extbase).
http://flow3.typo3.org/fileadmin/CGL/FLOW3_CGL_on_one_page-v6.pdf
As far as I have understood doc_core_cgl.sxw is related to the old style (pi1, pi2, etc...). I don't know the delta between the v4 and v5. At least, there is the odd comment convention that I don't particularly like.
Anyway, I will be able to continuous to live whenever we indent the code in the v4 style!
Updated by Reinhard Führicht about 4 years ago
The things I changed for now are single quotes where no double quotes are needed, adding spaces when doing string concatenation and adding spaces in parameter lists.
Looking at the guidelines for v5 there are some things we could do now like:
- formatting longer if statements
- adding the @author tags again to methods (I thought only for classes, but I was wrong)
others will have to wait as they require PHP 5.3, I guess (like namespaces and the backslash thing in classnames).
Updated by Reinhard Führicht about 4 years ago
- Status changed from New to Closed
- % Done changed from 70 to 100
should be fine for now