Completed
Push — master ( 364599...be4002 )
by Stephan
02:10
created
PurgePage.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@
 block discarded – undo
5 5
 class PurgePage {
6 6
 
7 7
 	public static function init() {
8
-		$GLOBALS[ 'wgExtensionMessagesFiles' ][ 'PurgePageMagic' ] = __DIR__ . '/PurgePage.magic.php';
8
+		$GLOBALS['wgExtensionMessagesFiles']['PurgePageMagic'] = __DIR__ . '/PurgePage.magic.php';
9 9
 	}
10 10
 
11
-	public static function registerParserFunction( \Parser &$parser ) {
11
+	public static function registerParserFunction(\Parser&$parser) {
12 12
 
13
-		$parser->setFunctionHook( 'purge', function () {
13
+		$parser->setFunctionHook('purge', function() {
14 14
 
15 15
 			$params = func_get_args();
16 16
 
17
-			if ( isset( $params[ 1 ] ) ) {
17
+			if (isset($params[1])) {
18 18
 
19
-				$pageName = $params[ 1 ];
19
+				$pageName = $params[1];
20 20
 
21
-				$title = \Title::newFromText( $pageName );
21
+				$title = \Title::newFromText($pageName);
22 22
 
23
-				if ( $title->isContentPage() && $title->exists() ) {
24
-					\WikiPage::factory( $title )->doPurge();
23
+				if ($title->isContentPage() && $title->exists()) {
24
+					\WikiPage::factory($title)->doPurge();
25 25
 				}
26 26
 
27 27
 			}
Please login to merge, or discard this patch.