phpbb / epv

Extension Pre-Validator
GNU General Public License v2.0
9 stars 17 forks source link

EPV should check for camel case function names #19

Closed iMattPro closed 10 years ago

iMattPro commented 10 years ago

Coding guidelines say, "all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript"

iMattPro commented 10 years ago

Although there are camel case function extensions must use, from symfony, such as getSubscribedEvents ... so maybe just a warning? This may be more annoying than it's worth... I like seeing all green with no errors or warnings on my EPV tests. I'd hate for every extension to always trigger warnings because of this.

bantu commented 10 years ago

I don't think this should be applied to extensions at all.

bantu commented 10 years ago

I actually think we discussed this in Copenhagen. You can not really enforce it since a class might implement a third party interface (e.g. Symfony as you already mentioned) that uses camel case.

DavidIQ commented 10 years ago

Maybe that part of the coding guidelines should be changed to allow either style in PHP?

iMattPro commented 10 years ago

@DavidIQ I don't think the CG should be changed, other than to say that camelCase in PHP may be allowed when using 3rd-party library/frameworks only.

DavidIQ commented 10 years ago

That's fine too.