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