From 50e7985d4d5e9f70bd27e61d84d43514004f23da Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 8 May 2013 01:00:15 +0200 Subject: phpcs: Fix WhiteSpace.LanguageConstructSpacing warnings Squiz.WhiteSpace.LanguageConstructSpacing: Language constructs must be followed by a single space; expected "require_once expression" but found "require_once(expression)" It is a keyword (e.g. like `new`, `return` and `print`). As such the parentheses don't make sense. Per our code conventions, we use a space after keywords like these. We appeared to have an unwritten exception for `require` that doesn't make sense. About 60% of require/include usage was missing the space and/or had superfluous parentheses. It is as silly as print("foo") or return("foo"), it works because keywords have no significance for whitespace between it and the expression that follows, and since experessions can be wrapped in parentheses for clarity (e.g. when doing string concatenation or mathematical operations) the parenthesis before and after basiclaly just ignored. Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87 --- maintenance/checkBadRedirects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'maintenance/checkBadRedirects.php') diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index 4ba7e66b6c10..2db8219ebf1b 100644 --- a/maintenance/checkBadRedirects.php +++ b/maintenance/checkBadRedirects.php @@ -61,4 +61,4 @@ class CheckBadRedirects extends Maintenance { } $maintClass = "CheckBadRedirects"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN; -- cgit v1.2.3