Completed
Push — master ( d6347b...483f37 )
by mw
196:07 queued 176:08
created
SemanticFormsSelect.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
  *
8 8
  * @defgroup SemanticFormsSelect Semantic Forms Select
9 9
  */
10
-if ( !defined( 'MEDIAWIKI' ) ) {
11
-	die( 'Not an entry point.' );
10
+if (!defined('MEDIAWIKI')) {
11
+	die('Not an entry point.');
12 12
 }
13 13
 
14
-if ( defined( 'SFS_VERSION' ) ) {
14
+if (defined('SFS_VERSION')) {
15 15
 	// Do not initialize more than once.
16 16
 	return 1;
17 17
 }
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public static function initExtension() {
34 34
 
35
-		define( 'SFS_VERSION', '2.0.0-alpha' );
35
+		define('SFS_VERSION', '2.0.0-alpha');
36 36
 
37 37
 		$GLOBALS['wgExtensionCredits']['semantic'][] = array(
38 38
 			'path' => __FILE__,
39 39
 			'name' => 'Semantic Forms Select',
40
-			'author' =>array( 'Jason Zhang', 'Toni Hermoso Pulido', '...' ),
40
+			'author' =>array('Jason Zhang', 'Toni Hermoso Pulido', '...'),
41 41
 			'url' => 'https://www.mediawiki.org/wiki/Extension:SemanticFormsSelect',
42 42
 			'description' => 'Allows to generate a select field in a semantic form whose values are retrieved from a query',
43 43
 			'version'  => SFS_VERSION,
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 
53 53
 		// Register resource files
54 54
 		$GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array(
55
-			'localBasePath' => __DIR__ ,
55
+			'localBasePath' => __DIR__,
56 56
 			'remoteExtPath' => 'SemanticFormsSelect',
57 57
 			'position' => 'bottom',
58
-			'scripts' => array( 'res/scriptSelect.js' ),
58
+			'scripts' => array('res/scriptSelect.js'),
59 59
 			'dependencies' => array(
60 60
 				'ext.pageforms.main'
61 61
 			)
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 	 */
68 68
 	public static function onExtensionFunction() {
69 69
 
70
-		if ( !defined( 'PF_VERSION' ) ) {
71
-			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.' );
70
+		if (!defined('PF_VERSION')) {
71
+			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.');
72 72
 		}
73 73
 
74
-		if ( isset( $GLOBALS['wgPageFormsFormPrinter'] )) {
75
-			$GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook( 'SF_Select', '\SFS\SemanticFormsSelect::init', array() );
74
+		if (isset($GLOBALS['wgPageFormsFormPrinter'])) {
75
+			$GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook('SF_Select', '\SFS\SemanticFormsSelect::init', array());
76 76
 		}
77 77
 	}
78 78
 
Please login to merge, or discard this patch.