Spage has uploaded a new change for review.
https://gerrit.wikimedia.org/r/224654
Change subject: phpcs fixups
......................................................................
phpcs fixups
The directory now passes phpcs apart from 'Duplicate class name
"SpecialHelloWorld' warnings.
Change-Id: I45467c94fb993f6f38692e6ab02fe78a7947f6bd
---
M DataPages/DataPages.example.php
M DataPages/DataPages.php
M DataPages/XmlContent.php
M DataPages/XmlContentHandler.php
M Example/Example.hooks.php
5 files changed, 15 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/examples
refs/changes/54/224654/1
diff --git a/DataPages/DataPages.example.php b/DataPages/DataPages.example.php
index 189b83e..09afb9a 100644
--- a/DataPages/DataPages.example.php
+++ b/DataPages/DataPages.example.php
@@ -5,7 +5,7 @@
//////////////////////////////////////////////////////////////
// load the extension
-require_once( $IP . '/extensions/examples/DataPages/DataPages.php' );
+require_once $IP . '/extensions/examples/DataPages/DataPages.php';
// Define a custom namespace for XML.
// If your extension is going to use an extra namespace,
@@ -19,4 +19,4 @@
// Associate the XML namespace with the XML content model provided by the
extension.
// CONTENT_MODEL_XML_DATA is a constant defined in DataPages.php.
-$wgNamespaceContentModels[ NS_XML ] = CONTENT_MODEL_XML_DATA;
\ No newline at end of file
+$wgNamespaceContentModels[ NS_XML ] = CONTENT_MODEL_XML_DATA;
diff --git a/DataPages/DataPages.php b/DataPages/DataPages.php
index 4371ef9..a3dfda5 100644
--- a/DataPages/DataPages.php
+++ b/DataPages/DataPages.php
@@ -21,7 +21,7 @@
*/
if ( !defined( 'MEDIAWIKI' ) ) {
- echo( "This file is an extension to the MediaWiki software and cannot
be used on its own.\n" );
+ echo "This file is an extension to the MediaWiki software and cannot be
used on its own.\n";
die( 1 );
}
@@ -45,4 +45,4 @@
$wgContentHandlers[CONTENT_MODEL_XML_DATA] = 'XmlContentHandler';
// The content model is typically associated with a namespace later,
-// see DataPages.example.php
\ No newline at end of file
+// see DataPages.example.php
diff --git a/DataPages/XmlContent.php b/DataPages/XmlContent.php
index 532d605..9677e9e 100644
--- a/DataPages/XmlContent.php
+++ b/DataPages/XmlContent.php
@@ -1,5 +1,5 @@
<?php
- /**
+/**
*
* Copyright © 25.05.13 by the authors listed below.
*
@@ -164,4 +164,4 @@
// for section based editing.
return parent::replaceSection( $section, $with, $sectionTitle );
}
-}
\ No newline at end of file
+}
diff --git a/DataPages/XmlContentHandler.php b/DataPages/XmlContentHandler.php
index efe3576..3e4d95f 100644
--- a/DataPages/XmlContentHandler.php
+++ b/DataPages/XmlContentHandler.php
@@ -1,5 +1,5 @@
<?php
- /**
+/**
*
* Copyright © 25.05.13 by the authors listed below.
*
@@ -93,4 +93,4 @@
// The default implementation is line-based, which isn't too
great for XML.
return parent::merge3( $oldContent, $myContent, $yourContent );
}
-}
\ No newline at end of file
+}
diff --git a/Example/Example.hooks.php b/Example/Example.hooks.php
index b7f2b76..0e2b4f5 100644
--- a/Example/Example.hooks.php
+++ b/Example/Example.hooks.php
@@ -44,7 +44,7 @@
// Add the following to a wiki page to see how it works:
// <dump>test</dump>
// <dump foo="bar" baz="quux">test content</dump>
- $parser->setHook( 'dump' , 'ExampleHooks::parserTagDump' );
+ $parser->setHook( 'dump', 'ExampleHooks::parserTagDump' );
// Add the following to a wiki page to see how it works:
// {{#echo: hello }}
@@ -115,7 +115,9 @@
// Very important to escape user data with htmlspecialchars()
to prevent
// an XSS security vulnerability.
- $html = '<pre>Dump Tag: ' . htmlspecialchars(
FormatJson::encode( $dump, /*prettyPrint=*/true ) ) . '</pre>';
+ $html = '<pre>Dump Tag: '
+ . htmlspecialchars( FormatJson::encode( $dump,
/*prettyPrint=*/true ) )
+ . '</pre>';
return $html;
}
@@ -147,6 +149,8 @@
'arguments' => $args,
);
- return '<pre>Showme Function: ' . htmlspecialchars(
FormatJson::encode( $showme, /*prettyPrint=*/true ) ) . '</pre>';
+ return '<pre>Showme Function: '
+ . htmlspecialchars( FormatJson::encode( $showme,
/*prettyPrint=*/true ) )
+ . '</pre>';
}
}
--
To view, visit https://gerrit.wikimedia.org/r/224654
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I45467c94fb993f6f38692e6ab02fe78a7947f6bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits