[MediaWiki-commits] [Gerrit] mediawiki...GoogleNewsSitemap[master]: Add phpcs and make pass

2017-05-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355142 )

Change subject: Add phpcs and make pass
..


Add phpcs and make pass

Change-Id: Icd3df8a7dc5d969be96304959317c6b0b6765526
---
M FeedSMItem.php
M GoogleNewsSitemap.alias.php
M GoogleNewsSitemap.php
M GoogleNewsSitemap_body.php
M SitemapFeed.php
M composer.json
A phpcs.xml
7 files changed, 163 insertions(+), 144 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/FeedSMItem.php b/FeedSMItem.php
index 81d6dcd..18471c8 100644
--- a/FeedSMItem.php
+++ b/FeedSMItem.php
@@ -1,5 +1,7 @@
 titleObj = $title;
 
parent::__construct( $title->getText(), '' /* Description */,
-   $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL  );
+   $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL );
}
 
/**
@@ -95,14 +97,14 @@
// but not much worse than the rest of this extension.
 
$result = '';
-   $req = new FauxRequest( array(
+   $req = new FauxRequest( [
'action' => 'parse',
'page' => $this->titleObj->getPrefixedDBKey(),
'prop' => 'text',
-   ) );
+   ] );
$main = new ApiMain( $req );
$main->execute();
-   $data = $main->getResult()->getResultData( null, array( 'BC' => 
array() ) );
+   $data = $main->getResult()->getResultData( null, [ 'BC' => [] ] 
);
 
if ( isset( $data['parse']['text']['*'] ) ) {
$result = $this->xmlEncode(
diff --git a/GoogleNewsSitemap.alias.php b/GoogleNewsSitemap.alias.php
index d4df65b..cc9e2e4 100644
--- a/GoogleNewsSitemap.alias.php
+++ b/GoogleNewsSitemap.alias.php
@@ -5,151 +5,150 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'GoogleNewsSitemap' => array( 'NewsFeed', 'GoogleNewsSitemap' ),
-);
+$specialPageAliases['en'] = [
+   'GoogleNewsSitemap' => [ 'NewsFeed', 'GoogleNewsSitemap' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'GoogleNewsSitemap' => array( 'خريطة_موقع_أخبار_جوجل' ),
-);
+$specialPageAliases['ar'] = [
+   'GoogleNewsSitemap' => [ 'خريطة_موقع_أخبار_جوجل' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'GoogleNewsSitemap' => array( 'خريطة_سايت_اخبار_جوجل' ),
-);
+$specialPageAliases['arz'] = [
+   'GoogleNewsSitemap' => [ 'خريطة_سايت_اخبار_جوجل' ],
+];
 
 /** Western Balochi (بلوچی رخشانی) */
-$specialPageAliases['bgn'] = array(
-   'GoogleNewsSitemap' => array( 'نۆچی_و_هبرئانی_وّرگ', 
'گوگل_ئی_اخبار_یی_وبسایت_یی_نخشه' ),
-);
+$specialPageAliases['bgn'] = [
+   'GoogleNewsSitemap' => [ 'نۆچی_و_هبرئانی_وّرگ', 
'گوگل_ئی_اخبار_یی_وبسایت_یی_نخشه' ],
+];
 
 /** German (Deutsch) */
-$specialPageAliases['de'] = array(
-   'GoogleNewsSitemap' => array( 'Nachrichtenfeed', 'Nachrichten-Feed' ),
-);
+$specialPageAliases['de'] = [
+   'GoogleNewsSitemap' => [ 'Nachrichtenfeed', 'Nachrichten-Feed' ],
+];
 
 /** Zazaki (Zazaki) */
-$specialPageAliases['diq'] = array(
-   'GoogleNewsSitemap' => array( 'XeberMırdkerdış', 
'SitaXeritayaGoogleXeber' ),
-);
+$specialPageAliases['diq'] = [
+   'GoogleNewsSitemap' => [ 'XeberMırdkerdış', 'SitaXeritayaGoogleXeber' ],
+];
 
 /** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-   'GoogleNewsSitemap' => array( 'خوراک_اخبار', 'نقشه_وبگاه_اخبار_گوگل' ),
-);
+$specialPageAliases['fa'] = [
+   'GoogleNewsSitemap' => [ 'خوراک_اخبار', 'نقشه_وبگاه_اخبار_گوگل' ],
+];
 
 /** Upper Sorbian (hornjoserbsce) */
-$specialPageAliases['hsb'] = array(
-   'GoogleNewsSitemap' => array( 'Powěsćowy_kanal' ),
-);
+$specialPageAliases['hsb'] = [
+   'GoogleNewsSitemap' => [ 'Powěsćowy_kanal' ],
+];
 
 /** Haitian (Kreyòl ayisyen) */
-$specialPageAliases['ht'] = array(
-   'GoogleNewsSitemap' => array( 'KatSitGoogleNews' ),
-);
+$specialPageAliases['ht'] = [
+   'GoogleNewsSitemap' => [ 'KatSitGoogleNews' ],
+];
 
 /** Hungarian (magyar) */
-$specialPageAliases['hu'] = array(
-   'GoogleNewsSitemap' => array( 'Google_Hírek-oldaltérkép' ),
-);
+$specialPageAliases['hu'] = [
+   'GoogleNewsSitemap' => [ 'Google_Hírek-oldaltérkép' ],
+];
 
 /** Interlingua (interlingua) */
-$specialPageAliases['ia'] = array(
-   'GoogleNewsSitemap' => array( 'Mappa_de_sito_Google_News' ),
-);
+$specialPageAliases['ia'] = [
+   'GoogleNewsSitemap' => [ 'Mappa_de_sito_Google_News' ],
+];
 
 /** Indonesian (Bahasa Indonesia) */
-$specialPageAliases['id'] = array(
-   'GoogleNewsSitemap' => array( 'Peta_situs_Google_News', 

[MediaWiki-commits] [Gerrit] mediawiki...GoogleNewsSitemap[master]: Add phpcs and make pass

2017-05-22 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355142 )

Change subject: Add phpcs and make pass
..

Add phpcs and make pass

Change-Id: Icd3df8a7dc5d969be96304959317c6b0b6765526
---
M FeedSMItem.php
M GoogleNewsSitemap.alias.php
M GoogleNewsSitemap.php
M SitemapFeed.php
M composer.json
A phpcs.xml
6 files changed, 31 insertions(+), 14 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleNewsSitemap 
refs/changes/42/355142/1

diff --git a/FeedSMItem.php b/FeedSMItem.php
index 81d6dcd..b0a9fbd 100644
--- a/FeedSMItem.php
+++ b/FeedSMItem.php
@@ -1,5 +1,7 @@
 titleObj = $title;
 
parent::__construct( $title->getText(), '' /* Description */,
-   $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL  );
+   $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL );
}
 
/**
@@ -95,14 +97,14 @@
// but not much worse than the rest of this extension.
 
$result = '';
-   $req = new FauxRequest( array(
+   $req = new FauxRequest( [
'action' => 'parse',
'page' => $this->titleObj->getPrefixedDBKey(),
'prop' => 'text',
-   ) );
+   ] );
$main = new ApiMain( $req );
$main->execute();
-   $data = $main->getResult()->getResultData( null, array( 'BC' => 
array() ) );
+   $data = $main->getResult()->getResultData( null, [ 'BC' => 
array() ] );
 
if ( isset( $data['parse']['text']['*'] ) ) {
$result = $this->xmlEncode(
diff --git a/GoogleNewsSitemap.alias.php b/GoogleNewsSitemap.alias.php
index d4df65b..c3bcb75 100644
--- a/GoogleNewsSitemap.alias.php
+++ b/GoogleNewsSitemap.alias.php
@@ -5,7 +5,6 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
 $specialPageAliases = array();
 
@@ -152,4 +151,4 @@
 /** Traditional Chinese (中文(繁體)‎) */
 $specialPageAliases['zh-hant'] = array(
'GoogleNewsSitemap' => array( '新聞訂閱', 'Google新聞地圖' ),
-);
\ No newline at end of file
+);
diff --git a/GoogleNewsSitemap.php b/GoogleNewsSitemap.php
index a63fc03..d2cbb5a 100644
--- a/GoogleNewsSitemap.php
+++ b/GoogleNewsSitemap.php
@@ -4,7 +4,8 @@
  * Outputs feed xml
  **
  * A Special Page extension to produce:
- *  Google News sitemap output - 
http://www.google.com/support/news_pub/bin/answer.py?hl=en=74288
+ *  Google News sitemap output
+ *  - 
http://www.google.com/support/news_pub/bin/answer.py?hl=en=74288
  *  - http://www.sitemaps.org/protocol.php
  *  RSS feed output - 2.0 http://www.rssboard.org/rss-specification
  *  - 0.92 http://www.rssboard.org/rss-0-9-2
@@ -52,10 +53,11 @@
$wgMessagesDirs['GoogleNewsSitemap'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['GoogleNewsSitemapAlias'] = __DIR__ . 
'/GoogleNewsSitemap.alias.php';
/*wfWarn(
-   'Deprecated PHP entry point used for GoogleNewsSitemap 
extension. Please use wfLoadExtension instead, ' .
+   'Deprecated PHP entry point used for GoogleNewsSitemap 
extension. ' .
+   'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
);*/
return;
 } else {
die( 'This version of the GoogleNewsSitemap extension requires 
MediaWiki 1.25+' );
-}
\ No newline at end of file
+}
diff --git a/SitemapFeed.php b/SitemapFeed.php
index aad7146..06e3529 100644
--- a/SitemapFeed.php
+++ b/SitemapFeed.php
@@ -1,5 +1,7 @@
 
+
+   
+   .
+   
+   
+   vendor
+   node_modules
+

-- 
To view, visit https://gerrit.wikimedia.org/r/355142
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd3df8a7dc5d969be96304959317c6b0b6765526
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleNewsSitemap
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits