Yep, detective Kevin found it: https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP
On Tue, May 12, 2015 at 5:36 PM, Oliver Keyes okeyes@wikimedia.org wrote:
Doesn't MW itself have a styleguide for PHP? (if that's the same as "code standard" ignore me ;p)
On 12 May 2015 at 20:02, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
Thoughts?
I think having code style is good, though I don't particularly care which one it is, provided it's reasonable. I have my personal preferences, but I can do any style within reason.
For a starting point in Java, perhaps we could use Effective Java[1] as a template, and (bias alert) sprinkle in some Functional Programming in Java[2] for good measure.
For PHP, I have no idea what I'm doing, but I have an interesting Functional Programming in PHP[3] book on my desk that y'all can borrow.
I'd be interested to look at [3] and [2] (and maybe [1] too if you have it). But I agree with Nik that real use of FP would probably be better on Java 8, it looks too clunky on Java 7.
As for code standard, looks like MediaWiki already has one, so we probably should use that one. There are tools like checkstyle btw to enforce it, but looks like WMF is not using them right now.
-- Stas Malyshev smalyshev@wikimedia.org
Wikimedia-search mailing list Wikimedia-search@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikimedia-search
-- Oliver Keyes Research Analyst Wikimedia Foundation
Wikimedia-search mailing list Wikimedia-search@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikimedia-search