Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364112 )

Change subject: Break long lines
......................................................................

Break long lines

Change-Id: I37141764512a1842fd443047223f6086f98067cb
---
M ApiLifeWeb.php
M LifeWeb.php
M SpecialLifeWeb.php
M lib/LifeWeb/Character.php
M lib/LifeWeb/Question.php
M lib/LifeWeb/Taxon.php
M phpcs.xml
7 files changed, 43 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LifeWeb 
refs/changes/12/364112/1

diff --git a/ApiLifeWeb.php b/ApiLifeWeb.php
index 8c2fc2c..a90440c 100644
--- a/ApiLifeWeb.php
+++ b/ApiLifeWeb.php
@@ -12,39 +12,48 @@
 
                $params = $this->extractRequestParams();
                if ( $params['what'] == 'taxonData' ) {
-                       $result->addValue( null, 'taxonData', 
\LifeWeb\Taxon::getTaxonData( $params['clearCache'] ) );
+                       $result->addValue( null, 'taxonData',
+                               \LifeWeb\Taxon::getTaxonData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'characterData' ) {
-                       $result->addValue( null, 'characterData', 
\LifeWeb\Character::getCharacterData( $params['clearCache'] ) );
+                       $result->addValue( null, 'characterData',
+                               \LifeWeb\Character::getCharacterData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'questionData' ) {
-                       $result->addValue( null, 'questionData', 
\LifeWeb\Question::getQuestionData( $params['clearCache'] ) );
+                       $result->addValue( null, 'questionData',
+                               \LifeWeb\Question::getQuestionData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'degreeData' ) {
-                       $result->addValue( null, 'degreeData', 
\LifeWeb\Degree::getDegreeData( $params['clearCache'] ) );
+                       $result->addValue( null, 'degreeData',
+                               \LifeWeb\Degree::getDegreeData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'equipmentData' ) {
-                       $result->addValue( null, 'equipmentData', 
\LifeWeb\Equipment::getEquipmentData( $params['clearCache'] ) );
+                       $result->addValue( null, 'equipmentData',
+                               \LifeWeb\Equipment::getEquipmentData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'difficultyData' ) {
-                       $result->addValue( null, 'difficultyData', 
\LifeWeb\Difficulty::getDifficultyData( $params['clearCache'] ) );
+                       $result->addValue( null, 'difficultyData',
+                               \LifeWeb\Difficulty::getDifficultyData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'collectionData' ) {
-                       $result->addValue( null, 'collectionData', 
\LifeWeb\Collection::getCollectionData( $params['clearCache'] ) );
+                       $result->addValue( null, 'collectionData',
+                               \LifeWeb\Collection::getCollectionData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'componentData' ) {
-                       $result->addValue( null, 'componentData', 
\LifeWeb\Component::getComponentData( $params['clearCache'] ) );
+                       $result->addValue( null, 'componentData',
+                               \LifeWeb\Component::getComponentData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'topicData' ) {
-                       $result->addValue( null, 'topicData', 
\LifeWeb\Topic::getTopicData( $params['clearCache'] ) );
+                       $result->addValue( null, 'topicData',
+                               \LifeWeb\Topic::getTopicData( 
$params['clearCache'] ) );
                        $result->addValue( null, 'ok', 'true' );
 
                } elseif ( $params['what'] == 'questionEquipmentData' ) {
diff --git a/LifeWeb.php b/LifeWeb.php
index f3d9f62..6858e0e 100644
--- a/LifeWeb.php
+++ b/LifeWeb.php
@@ -5,7 +5,8 @@
  * @author Simon A. Eugster <[email protected]>
  */
 
-# Alert the user that this is not a valid access point to MediaWiki if they 
try to access the special pages file directly.
+# Alert the user that this is not a valid access point to MediaWiki
+# if they try to access the special pages file directly.
 if ( !defined( 'MEDIAWIKI' ) ) {
        echo <<<EOT
 To install LifeWeb, put the following line in LocalSettings.php:
@@ -23,11 +24,13 @@
        'version' => '0.1.0',
 ];
 
-$wgAutoloadClasses[ 'SpecialLifeWeb' ] = __DIR__ . '/SpecialLifeWeb.php'; # 
Location of the SpecialMyExtension class (Tell MediaWiki to load this file)
+# Location of the SpecialMyExtension class (Tell MediaWiki to load this file)
+$wgAutoloadClasses[ 'SpecialLifeWeb' ] = __DIR__ . '/SpecialLifeWeb.php';
 $wgMessagesDirs['LifeWeb'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles[ 'LifeWeb' ] = __DIR__ . '/LifeWeb.i18n.php';
 $wgExtensionMessagesFiles[ 'LifeWebAlias' ] = __DIR__ . '/LifeWeb.alias.php';
-$wgSpecialPages[ 'LifeWeb' ] = 'SpecialLifeWeb'; # Tell MediaWiki about the 
new special page and its class name
+# Tell MediaWiki about the new special page and its class name
+$wgSpecialPages[ 'LifeWeb' ] = 'SpecialLifeWeb';
 $wgAPIListModules[ 'LifeWeb' ] = 'ApiLifeWeb';
 
 $wgResourceModules['ext.LifeWeb.test'] = [
diff --git a/SpecialLifeWeb.php b/SpecialLifeWeb.php
index 80192c8..335bfd5 100644
--- a/SpecialLifeWeb.php
+++ b/SpecialLifeWeb.php
@@ -47,19 +47,22 @@
                        $output->addModules( 'ext.LifeWeb.filter' );
                        $output->addHTML( '<div id="filter">Filter goes 
here.</div>' );
                        $output->addInlineStyle( '#footer, h1#firstHeading { 
display: none; }' );
-                       $output->addInlineStyle( 'div#content { 
background-color: transparent; border-color: transparent; }' );
+                       $output->addInlineStyle(
+                               'div#content { background-color: transparent; 
border-color: transparent; }'
+                       );
                        return;
                }
                if ( $par == 'clouds' ) {
                        $output->addModules( 'ext.LifeWeb.filter' );
-                       $output->addHTML( '<div id="filter" 
topicID="'.$wgLWSettings['topicIDs']['clouds'].'">Filter goes here.</div>' );
+                       $output->addHTML( '<div id="filter" topicID="' . 
$wgLWSettings['topicIDs']['clouds'] .
+                               '">Filter goes here.</div>' );
                        return;
                }
 
                $output->addWikiText(
                        "=== Identification Key ===\n" .
-                       "This identification key consists of two parts: The key 
itself and the editor. If you start from scratch, " .
-                       "you may want to start with the editor and enter some 
data:"
+                       "This identification key consists of two parts: The key 
itself and the editor. " .
+                       "If you start from scratch, you may want to start with 
the editor and enter some data:"
                );
                $output->addHTML(
                        '<strong>' .
@@ -97,7 +100,8 @@
                                [ 'debug' => 'true' ]
                        ) .
                        '</strong></li><li>API example: ' .
-                       '<a href="' . $wgScriptPath . 
'/api.php?action=query&list=LifeWeb&format=json&what=taxonData">Taxon 
data</a></li></ul>'
+                       '<a href="' . $wgScriptPath . 
'/api.php?action=query&list=LifeWeb&format=json' .
+                       '&what=taxonData">Taxon data</a></li></ul>'
                );
        }
 
diff --git a/lib/LifeWeb/Character.php b/lib/LifeWeb/Character.php
index a72863b..f366d14 100644
--- a/lib/LifeWeb/Character.php
+++ b/lib/LifeWeb/Character.php
@@ -26,7 +26,8 @@
                $oldRev = $this->data['revid'];
                if ( $this->updateContent( $oldRev ) || $clearCache ) {
                        $images = $this->getStrings( EntityIDs::pid( 'pImage' ) 
);
-                       $questions = $this->getItems( EntityIDs::pid( 
'pParentQuestion' ), EntityIDs::pid( 'qQuestion' ) );
+                       $questions = $this->getItems( EntityIDs::pid( 
'pParentQuestion' ),
+                               EntityIDs::pid( 'qQuestion' ) );
 
                        $name = $this->getEntity()->getLabel( 
$wgLang->getCode() );
                        if ( !$name ) {
diff --git a/lib/LifeWeb/Question.php b/lib/LifeWeb/Question.php
index a618e9b..fc5b663 100644
--- a/lib/LifeWeb/Question.php
+++ b/lib/LifeWeb/Question.php
@@ -26,9 +26,12 @@
                                $name = $this->getPrefixedId();
                        }
 
-                       $difficulties = $this->getItems( EntityIDs::pid( 
'pDifficulty' ), EntityIDs::pid( 'qDifficulty' ) );
-                       $parentCharacters = $this->getItems( EntityIDs::pid( 
'pParentCharacter' ), EntityIDs::pid( 'qCharacter' ) );
-                       $components =  $this->getItems( EntityIDs::pid( 
'pComponent' ), EntityIDs::pid( 'qComponent' ) );
+                       $difficulties = $this->getItems( EntityIDs::pid( 
'pDifficulty' ),
+                               EntityIDs::pid( 'qDifficulty' ) );
+                       $parentCharacters = $this->getItems( EntityIDs::pid( 
'pParentCharacter' ),
+                               EntityIDs::pid( 'qCharacter' ) );
+                       $components =  $this->getItems( EntityIDs::pid( 
'pComponent' ),
+                               EntityIDs::pid( 'qComponent' ) );
                        $times = $this->getStrings( EntityIDs::pid( 'pTime' ) );
 
                        $this->data = [
diff --git a/lib/LifeWeb/Taxon.php b/lib/LifeWeb/Taxon.php
index 2bb4e3a..f8f9659 100644
--- a/lib/LifeWeb/Taxon.php
+++ b/lib/LifeWeb/Taxon.php
@@ -37,7 +37,8 @@
                                'name' => count( $names ) > 0 ? $names[0] : '',
                                'topic' => count( $topics ) > 0 ? $topics[0] : 
null,
                                'images' => $images,
-                               'characters' => $this->getItems( 
EntityIDs::pid( 'pHasCharacter' ), EntityIDs::pid( 'qCharacter' ) ),
+                               'characters' => $this->getItems( 
EntityIDs::pid( 'pHasCharacter' ),
+                                       EntityIDs::pid( 'qCharacter' ) ),
                                'degree' => count( $degrees ) > 0 ? $degrees[0] 
: '',
                                'parentTaxon' => count( $parent ) > 0 ? 
$parent[0] : '',
                                'updated' => date( 'Y-m-d H:i:s' ).' UTC',
diff --git a/phpcs.xml b/phpcs.xml
index 1495854..4ccfde5 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,7 +2,6 @@
 <ruleset name="MediaWiki">
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <!-- Disable failing rules -->
-               <exclude name="Generic.Files.LineLength" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37141764512a1842fd443047223f6086f98067cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LifeWeb
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to