Completed
Push — master ( 2044fd...528642 )
by mw
02:44
created
tests/bootstrap.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( PHP_SAPI !== 'cli' ) {
4
-	die( 'Not an entry point' );
3
+if (PHP_SAPI !== 'cli') {
4
+	die('Not an entry point');
5 5
 }
6 6
 
7
-error_reporting( E_ALL | E_STRICT );
8
-date_default_timezone_set( 'UTC' );
9
-ini_set( 'display_errors', 1 );
7
+error_reporting(E_ALL | E_STRICT);
8
+date_default_timezone_set('UTC');
9
+ini_set('display_errors', 1);
10 10
 
11 11
 
12
-if ( !is_readable( $autoloaderClassPath = __DIR__ . '/../../SemanticMediaWiki/tests/autoloader.php' ) ) {
13
-	die( 'The Semantic MediaWiki test autoloader is not available' );
12
+if (!is_readable($autoloaderClassPath = __DIR__.'/../../SemanticMediaWiki/tests/autoloader.php')) {
13
+	die('The Semantic MediaWiki test autoloader is not available');
14 14
 }
15 15
 
16
-if ( !class_exists( 'SemanticFormsSelect' ) || ( $version = SemanticFormsSelect::getVersion() ) === null ) {
17
-	die( "\nSemantic Forms Select is not available, please check your Composer or LocalSettings.\n" );
16
+if (!class_exists('SemanticFormsSelect') || ($version = SemanticFormsSelect::getVersion()) === null) {
17
+	die("\nSemantic Forms Select is not available, please check your Composer or LocalSettings.\n");
18 18
 }
19 19
 
20
-print sprintf( "\n%-20s%s\n", "Semantic Forms Select: ", $version );
21
-print sprintf( "%-20s%s\n", "Page Forms: ", SemanticFormsSelect::getVersion( 'PageForms' ) );
20
+print sprintf("\n%-20s%s\n", "Semantic Forms Select: ", $version);
21
+print sprintf("%-20s%s\n", "Page Forms: ", SemanticFormsSelect::getVersion('PageForms'));
22 22
 
23 23
 $autoloader = require $autoloaderClassPath;
24
-$autoloader->addPsr4( 'SFS\\Tests\\', __DIR__ . '/phpunit/Unit' );
25
-$autoloader->addPsr4( 'SFS\\Tests\\Integration\\', __DIR__ . '/phpunit/Integration' );
26
-unset( $autoloader );
24
+$autoloader->addPsr4('SFS\\Tests\\', __DIR__.'/phpunit/Unit');
25
+$autoloader->addPsr4('SFS\\Tests\\Integration\\', __DIR__.'/phpunit/Integration');
26
+unset($autoloader);
Please login to merge, or discard this patch.
SemanticFormsSelect.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	 */
16 16
 	public static function initExtension() {
17 17
 
18
-		define( 'SFS_VERSION', '2.0.0' );
18
+		define('SFS_VERSION', '2.0.0');
19 19
 
20 20
 		// Api modules
21 21
 		$GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect';
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 		// Register resource files
27 27
 		$GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array(
28
-			'localBasePath' => __DIR__ ,
28
+			'localBasePath' => __DIR__,
29 29
 			'remoteExtPath' => 'SemanticFormsSelect',
30 30
 			'position' => 'bottom',
31 31
 			'scripts' => array(
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public static function onExtensionFunction() {
44 44
 
45
-		if ( !defined( 'PF_VERSION' ) ) {
46
-			die( '<b>Error:</b><a href="https://github.com/SemanticMediaWiki/SemanticFormsSelect/">Semantic Forms Select</a> requires the <a href="https://www.mediawiki.org/wiki/Extension:PageForms">Page Forms</a> extension. Please install and activate this extension first.' );
45
+		if (!defined('PF_VERSION')) {
46
+			die('<b>Error:</b><a href="https://github.com/SemanticMediaWiki/SemanticFormsSelect/">Semantic Forms Select</a> requires the <a href="https://www.mediawiki.org/wiki/Extension:PageForms">Page Forms</a> extension. Please install and activate this extension first.');
47 47
 		}
48 48
 
49
-		if ( isset( $GLOBALS['wgPageFormsFormPrinter'] )) {
50
-			$GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook( 'SF_Select', '\SFS\SemanticFormsSelect::init', array() );
49
+		if (isset($GLOBALS['wgPageFormsFormPrinter'])) {
50
+			$GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook('SF_Select', '\SFS\SemanticFormsSelect::init', array());
51 51
 		}
52 52
 	}
53 53
 
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 	 *
59 59
 	 * @return string|null
60 60
 	 */
61
-	public static function getVersion( $dependency = null ) {
61
+	public static function getVersion($dependency = null) {
62 62
 
63
-		if ( $dependency === null && defined( 'SFS_VERSION' ) ) {
63
+		if ($dependency === null && defined('SFS_VERSION')) {
64 64
 			return SFS_VERSION;
65 65
 		}
66 66
 
67
-		if ( $dependency === 'PageForms' && defined( 'PF_VERSION' ) ) {
67
+		if ($dependency === 'PageForms' && defined('PF_VERSION')) {
68 68
 			return PF_VERSION;
69 69
 		}
70 70
 
Please login to merge, or discard this patch.