[MediaWiki-commits] [Gerrit] mediawiki...LifeWeb[master]: Added a composer.json file in order to lint the PHP

2016-12-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329236 )

Change subject: Added a composer.json file in order to lint the PHP
..


Added a composer.json file in order to lint the PHP

* Ran phpcbf locally to clean up the code

Bug: T154147
Change-Id: I5a787952de804978709cde5ae159f19410e72297
---
M ApiLifeWeb.php
M LifeWeb.i18n.php
M LifeWeb.php
M SpecialLifeWeb.php
A composer.json
M lib/LifeWeb/Character.php
M lib/LifeWeb/Collection.php
M lib/LifeWeb/Component.php
M lib/LifeWeb/Degree.php
M lib/LifeWeb/Difficulty.php
M lib/LifeWeb/EntityIDs.php
M lib/LifeWeb/Equipment.php
M lib/LifeWeb/LWItem.php
M lib/LifeWeb/Query.php
M lib/LifeWeb/Question.php
M lib/LifeWeb/Taxon.php
M lib/LifeWeb/Topic.php
A phpcs.xml
18 files changed, 895 insertions(+), 887 deletions(-)

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



diff --git a/ApiLifeWeb.php b/ApiLifeWeb.php
index 7b2dc13..f70cc1b 100644
--- a/ApiLifeWeb.php
+++ b/ApiLifeWeb.php
@@ -7,112 +7,112 @@
 
 class ApiLifeWeb extends \ApiQueryBase {
 
-public function execute() {
-$result = $this->getResult();
+   public function execute() {
+   $result = $this->getResult();
 
-$params = $this->extractRequestParams();
-if ($params['what'] == 'taxonData') {
-$result->addValue(null, 'taxonData', 
\LifeWeb\Taxon::getTaxonData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   $params = $this->extractRequestParams();
+   if ( $params['what'] == 'taxonData' ) {
+   $result->addValue( null, 'taxonData', 
\LifeWeb\Taxon::getTaxonData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'characterData') {
-$result->addValue(null, 'characterData', 
\LifeWeb\Character::getCharacterData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'characterData' ) {
+   $result->addValue( null, 'characterData', 
\LifeWeb\Character::getCharacterData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'questionData') {
-$result->addValue(null, 'questionData', 
\LifeWeb\Question::getQuestionData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'questionData' ) {
+   $result->addValue( null, 'questionData', 
\LifeWeb\Question::getQuestionData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'degreeData') {
-$result->addValue(null, 'degreeData', 
\LifeWeb\Degree::getDegreeData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'degreeData' ) {
+   $result->addValue( null, 'degreeData', 
\LifeWeb\Degree::getDegreeData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'equipmentData') {
-$result->addValue(null, 'equipmentData', 
\LifeWeb\Equipment::getEquipmentData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'equipmentData' ) {
+   $result->addValue( null, 'equipmentData', 
\LifeWeb\Equipment::getEquipmentData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'difficultyData') {
-$result->addValue(null, 'difficultyData', 
\LifeWeb\Difficulty::getDifficultyData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'difficultyData' ) {
+   $result->addValue( null, 'difficultyData', 
\LifeWeb\Difficulty::getDifficultyData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'collectionData') {
-$result->addValue(null, 'collectionData', 
\LifeWeb\Collection::getCollectionData($params['clearCache']));
-$result->addValue(null, 'ok', 'true');
+   } elseif ( $params['what'] == 'collectionData' ) {
+   $result->addValue( null, 'collectionData', 
\LifeWeb\Collection::getCollectionData( $params['clearCache'] ) );
+   $result->addValue( null, 'ok', 'true' );
 
-} else if ($params['what'] == 'componentData') {
-$result->addValue(null, 'componentData', 
\LifeWeb\Component::getComponentData($params['clearCache']));
-$result->addValue(null, 'ok

[MediaWiki-commits] [Gerrit] mediawiki...LifeWeb[master]: Added a composer.json file in order to lint the PHP

2016-12-26 Thread MtDu (Code Review)
MtDu has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329236 )

Change subject: Added a composer.json file in order to lint the PHP
..

Added a composer.json file in order to lint the PHP

Bug: T154147
Change-Id: I5a787952de804978709cde5ae159f19410e72297
---
A composer.json
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/composer.json b/composer.json
new file mode 100644
index 000..90ed98b
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,15 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor",
+   "phpcs -p"
+   ],
+   "fix": [
+   "phpcbf"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a787952de804978709cde5ae159f19410e72297
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LifeWeb
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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