From: Umherirrender Date: Sun, 24 Sep 2017 16:13:53 +0000 (+0200) Subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 X-Git-Tag: 1.31.0-rc.0~1915^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=bd741b83bcff92d057ccd052c2818b0a04694044;p=lhc%2Fweb%2Fwiklou.git build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 Change-Id: Ia24dbf015f2b4781683ca980a460d0ac3e85674e --- diff --git a/composer.json b/composer.json index 34f9559cbe..23ca850bf3 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "jakub-onderka/php-parallel-lint": "0.9.2", "jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a", "justinrainbow/json-schema": "~5.2", - "mediawiki/mediawiki-codesniffer": "0.12.0", + "mediawiki/mediawiki-codesniffer": "13.0.0", "monolog/monolog": "~1.22.1", "nikic/php-parser": "2.1.0", "nmred/kafka-php": "0.1.5", diff --git a/includes/CommentStoreComment.php b/includes/CommentStoreComment.php index 3920ba083f..7ed86d66c7 100644 --- a/includes/CommentStoreComment.php +++ b/includes/CommentStoreComment.php @@ -20,8 +20,6 @@ * @file */ -use Wikimedia\Rdbms\IDatabase; - /** * CommentStoreComment represents a comment stored by CommentStore. The fields * should be considered read-only. diff --git a/includes/context/ContextSource.php b/includes/context/ContextSource.php index cea84605ea..6530550fe5 100644 --- a/includes/context/ContextSource.php +++ b/includes/context/ContextSource.php @@ -18,7 +18,6 @@ * @author Happy-melon * @file */ -use Liuggio\StatsdClient\Factory\StatsdDataFactory; use MediaWiki\MediaWikiServices; /** diff --git a/includes/context/DerivativeContext.php b/includes/context/DerivativeContext.php index 6e3eda6f9c..82b97ec1aa 100644 --- a/includes/context/DerivativeContext.php +++ b/includes/context/DerivativeContext.php @@ -18,7 +18,6 @@ * @author Daniel Friesen * @file */ -use Liuggio\StatsdClient\Factory\StatsdDataFactory; use MediaWiki\MediaWikiServices; /** diff --git a/includes/context/IContextSource.php b/includes/context/IContextSource.php index 895e9e4b55..5a856cf7c1 100644 --- a/includes/context/IContextSource.php +++ b/includes/context/IContextSource.php @@ -21,8 +21,6 @@ * @file */ -use Liuggio\StatsdClient\Factory\StatsdDataFactory; - /** * Interface for objects which can provide a MediaWiki context on request * diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index 4a772eecd2..7cabd405cc 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -22,7 +22,6 @@ * @file */ -use Liuggio\StatsdClient\Factory\StatsdDataFactory; use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; use Wikimedia\ScopedCallback; diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php index 90660797f1..a1f7e0c002 100644 --- a/includes/import/WikiImporter.php +++ b/includes/import/WikiImporter.php @@ -23,7 +23,6 @@ * @file * @ingroup SpecialPage */ -use MediaWiki\MediaWikiServices; /** * XML file reader for the page data importer. diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 556d0d5388..10a54109b5 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -20,7 +20,6 @@ * @file * @ingroup Deployment */ -use Wikimedia\Rdbms\Field; use Wikimedia\Rdbms\MySQLField; use MediaWiki\MediaWikiServices; diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index e7417eb84a..65f84db345 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -1138,6 +1138,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * * @param string $error Error text * @param int $errno Error number + * @return bool */ protected function wasQueryTimeout( $error, $errno ) { return false; diff --git a/includes/libs/stats/NullStatsdDataFactory.php b/includes/libs/stats/NullStatsdDataFactory.php index d346f651f8..ed16311929 100644 --- a/includes/libs/stats/NullStatsdDataFactory.php +++ b/includes/libs/stats/NullStatsdDataFactory.php @@ -2,7 +2,6 @@ use Liuggio\StatsdClient\Entity\StatsdData; use Liuggio\StatsdClient\Entity\StatsdDataInterface; -use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; /** * @author Addshore diff --git a/includes/session/Session.php b/includes/session/Session.php index 23d9ab3838..024bf9a2b0 100644 --- a/includes/session/Session.php +++ b/includes/session/Session.php @@ -621,31 +621,37 @@ final class Session implements \Countable, \Iterator, \ArrayAccess { * @{ */ + /** @inheritDoc */ public function count() { $data = &$this->backend->getData(); return count( $data ); } + /** @inheritDoc */ public function current() { $data = &$this->backend->getData(); return current( $data ); } + /** @inheritDoc */ public function key() { $data = &$this->backend->getData(); return key( $data ); } + /** @inheritDoc */ public function next() { $data = &$this->backend->getData(); next( $data ); } + /** @inheritDoc */ public function rewind() { $data = &$this->backend->getData(); reset( $data ); } + /** @inheritDoc */ public function valid() { $data = &$this->backend->getData(); return key( $data ) !== null; @@ -678,10 +684,12 @@ final class Session implements \Countable, \Iterator, \ArrayAccess { return $data[$offset]; } + /** @inheritDoc */ public function offsetSet( $offset, $value ) { $this->set( $offset, $value ); } + /** @inheritDoc */ public function offsetUnset( $offset ) { $this->remove( $offset ); } diff --git a/maintenance/populatePPSortKey.php b/maintenance/populatePPSortKey.php index 7e3c2c3d25..366905a6a9 100644 --- a/maintenance/populatePPSortKey.php +++ b/maintenance/populatePPSortKey.php @@ -23,8 +23,6 @@ require_once __DIR__ . '/Maintenance.php'; -use Wikimedia\Rdbms\IDatabase; - /** * Usage: * populatePPSortKey.php diff --git a/phpcs.xml b/phpcs.xml index bd9890b231..29ddca34cc 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -7,7 +7,6 @@ - @@ -23,6 +22,9 @@ + + + diff --git a/tests/phan/config.php b/tests/phan/config.php index 8a82d74c00..ccc0177c68 100644 --- a/tests/phan/config.php +++ b/tests/phan/config.php @@ -1,7 +1,5 @@