Le 18/03/2011 18:33, Hans De Bisschop a écrit :
Hi Philippe,

White spaces before parentheses : My point of view is to use that whitespace to make a difference between control structure and methods.

Therefore I would add a whitespace before each opening parenthesis of control structure (if, elseif, for, foreach, while, catch, switch, array) and not before the opening parenthesis of method (neither definition nor call)

Maybe its' just me but ... that sounds exactly like the way I've been doing it for years now.
E.g. if ($blah === 1) vs. function blah($variable, $value)

If there's anything on the wiki-page that contradicts that, it's a typo / copying error. Or is there something I'm missing in what you prefer?

I agree with that but on the wiki I read a difference between for and foreach statement. I just wanted to point out the fact that this space is used to differentiate control structure from function calls. So as long as we treat all control structure the same way which is not the same way than function calls I'll be happy ^^

"

I do not agree with the wrapping policy I would personnaly wrap in almost all cases when the line is longer than 120 chars. The only exception is for strings which sometimes cannot be wrapped (but I personnaly wrap them as much as keeping the meaning of the string is possible).
You're probably right on that. I personally find that I apply the "common sense" rule for wrapping. Sadly enough my IDE doesn't have a "common sense" option for wrapping ;-)

I fully agree with common sense wrapping but a rule of thumb is a good idea ^^

Personnally I hate reading one-line array initialization (especially with nested arrays) and the same goes for complex boolean expression (which should mostly be affected to a local variable anyway)

To answer Yannick's remark I think that line should be shorter than 80 chars in general and there should be a very good reason for making lines larger than 120 chars.

Nobody forces wrapping, I'm just proposing a netbeans config / codesniffer standard that does/inform about it when called.



Feel free to change the wiki-page accordingly

80 chars per line / wrapping if long / space gefore opening parenthesis for all control structure ?

Best regards,
Hans

On 18/03/2011 10:11, Systho wrote:
I've began the netbeans config according to conventions (because I think it is a more important tool than the CodeSniffer Standard) but I have a few questions :

White spaces before parentheses : My point of view is to use that whitespace to make a difference between control structure and methods.

Therefore I would add a whitespace before each opening parenthesis of control structure (if, elseif, for, foreach, while, catch, switch, array) and not before the opening parenthesis of method (neither definition nor call)

I do not agree with the wrapping policy I would personnaly wrap in almost all cases when the line is longer than 120 chars. The only exception is for strings which sometimes cannot be wrapped (but I personnaly wrap them as much as keeping the meaning of the string is possible).

Here is a config transforming beforeFormatting.php into afterFormatting.php

PS : this is my nbproject/project.properties file , if you just want to add the formatter rules, just copy the lines related to formatting ;)

Systho

Le 18/03/2011 9:10, Stefaan Vanbillemont a écrit :
Systho,

I will try the CLI script today .. I keep you informed about the outcome.

Kind Regards,

Stefaan.


Op 17/03/11 17:20, Philippe Van Eerdenbrugghe schreef:
Dear all,

The new CLI installer is there.

if you want to use it just go into your console and type :

php script/chamilo.php install -c MyConfigFile

or

php script/chamilo.php install --configuration=MyConfigFile

The format of the config file is the one you cand find in install/php/lib/command_line_configuration.dist.php but you should only override the values you want to change.


Systho

_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev


_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev


_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev
_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

Reply via email to