diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2013-05-08 01:00:15 +0200 |
---|---|---|
committer | Timo Tijhof <krinklemail@gmail.com> | 2013-05-09 05:56:26 +0200 |
commit | 50e7985d4d5e9f70bd27e61d84d43514004f23da (patch) | |
tree | a0c9334b0841dc68992d0dfa6fa6aedb15d2c00d /tests/selenium | |
parent | ee85aac6ffb80b290f6d7794bf1d9d76f40e5de5 (diff) | |
download | mediawikicore-50e7985d4d5e9f70bd27e61d84d43514004f23da.tar.gz mediawikicore-50e7985d4d5e9f70bd27e61d84d43514004f23da.zip |
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
Diffstat (limited to 'tests/selenium')
-rw-r--r-- | tests/selenium/Selenium.php | 2 | ||||
-rw-r--r-- | tests/selenium/SeleniumLoader.php | 6 | ||||
-rw-r--r-- | tests/selenium/SeleniumTestCase.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/selenium/Selenium.php b/tests/selenium/Selenium.php index 07f9867125ba..935d692d2854 100644 --- a/tests/selenium/Selenium.php +++ b/tests/selenium/Selenium.php @@ -4,7 +4,7 @@ * This is implemented as a singleton. */ -require( 'Testing/Selenium.php' ); +require 'Testing/Selenium.php'; class Selenium { protected static $_instance = null; diff --git a/tests/selenium/SeleniumLoader.php b/tests/selenium/SeleniumLoader.php index 8d5e77139a7f..1a860f4b72af 100644 --- a/tests/selenium/SeleniumLoader.php +++ b/tests/selenium/SeleniumLoader.php @@ -2,8 +2,8 @@ class SeleniumLoader { static function load() { - require_once( 'Testing/Selenium.php' ); - require_once( 'PHPUnit/Framework.php' ); - require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' ); + require_once 'Testing/Selenium.php'; + require_once 'PHPUnit/Framework.php'; + require_once 'PHPUnit/Extensions/SeleniumTestCase.php'; } } diff --git a/tests/selenium/SeleniumTestCase.php b/tests/selenium/SeleniumTestCase.php index 5346b1be80f0..a2676caf2bba 100644 --- a/tests/selenium/SeleniumTestCase.php +++ b/tests/selenium/SeleniumTestCase.php @@ -1,5 +1,5 @@ <?php -include( "SeleniumTestConstants.php" ); +include 'SeleniumTestConstants.php'; class SeleniumTestCase extends PHPUnit_Framework_TestCase { // PHPUnit_Extensions_SeleniumTestCase protected $selenium; |