Hi Yannick.

Thanks for your feedback. I updated the page
http://wiki.dolibarr.org/index.php/Language_and_development_rules so things
should be easier to understand and you should find answer to all your
questions.

2015-06-28 3:00 GMT+02:00 Yannick Warnier <[email protected]>:

> Hi guys,
>
> First of all, just a short presentation: my name is Yannick Warnier, I
> worked as one of the first 20 Dolibarr developers or so (copyright
> notices in VAT reports say it was between 2006 and 2007). I stopped
> developing mainly because I was too busy with my own project (Dokeos and
> then Chamilo). I speak and write fluently French, English and Spanish.
> I'm using English to increase my chances to be understood.
>
> At our company, we've been working with Dolibarr 2.2 for years and have
> recently found a little time to work on an upgrade to 3.7 (or 3.8 to
> come).
>
> As part of that work, I'm reviewing some of the work I had done back
> then, and I am mostly interested in htdocs/compta/tva/quadri_detail.php
>
> I saw that it was modified considerably (definitely improved) and that
> some of the functions I wrote were slightly changed and moved to
> core/lib/tax.lib.php (thanks for that).
>
> This being said, I want to re-create my original report, because the new
> version removed some dates and other info we needed for our VAT report
> in Belgium.
>
> As such, I am looking at how to modify a copy of this script, and I'm
> faced with a series of questions/comments I do not know how to answer,
> and after visiting
> http://wiki.dolibarr.org/index.php/Language_and_development_rules I am
> still a bit unsure, so here they are:
>
> 1) It says you use PSR-2, but the code is filled with non-conformant
> PSR-2 (which includes PSR-1). So my question is:
> Should I consider PSR-2 is the norm and switch everything I see that is
> non-conformant to PSR-2, or should I leave it like that?
> And should my code be PSR-2 conformant or should I try to integrate to
> what is there at the moment?
>
> 2) One line says: "Do not use PHP_SELF. Use instead
> $_SERVER["PHP_SELF"]."
> I was wondering if you were considering that $_SERVER is something
> hackable, and as such should be filtered... (so using
> $_SERVER['PHP_SELF'] unfiltered is definitely an issue)
>
> 3) It says "When several variables must be initialized with same value,
> you must use several lines", but the example below is on a single
> line...
>
> 4) About PSR-2 exceptions:
>
> 4a) you mention 2, and then there are 4 that are not all real exceptions
>
> 4b) you indicate that *you* accept more than 80 chars per line.
> Actually, PSR-2 mention you *should* try lower than 80, but you *can* go
> up to 120.
>
> 4c) you mention that you don't replace the tabs with spaces because that
> drives editors crazy... I'm not sure about the editors you use, but I
> use VIM, Eclipse and PHPStorm, and the crazyness only happens with tabs,
> not spaces. Furthermore, I see that many files have either 4 spaces *or*
> tabs, so I don't really understand what I should respect...
> In any case, if that's worth anything, PSR-2 should be used strictly, so
> 4 spaces is a good idea and it's easy to implement (most editors offer a
> tabs-replacement-with-spaces feature that is safe to implement)
>
> The rest is pretty clear to me.
>
>
>
>
> _______________________________________________
> Dolibarr-dev mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
>



-- 
EMail: [email protected]
Web: http://www.destailleur.fr
------------------------------------------------------------------------------------
Google+: https://plus.google.com/+LaurentDestailleur/
Facebook: https://www.facebook.com/Destailleur.Laurent
Twitter: http://www.twitter.com/eldy10
------------------------------------------------------------------------------------
* Dolibarr (Project leader): http://www.dolibarr.org (make a donation for
Dolibarr project via Paypal: [email protected])
* AWStats (Author) : http://awstats.sourceforge.net (make a donation for
AWStats project via Paypal: [email protected])
* AWBot (Author) : http://awbot.sourceforge.net
* CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à