build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2326cf81e907f2a02615f96f922b66fd2806defd
This commit is contained in:
Umherirrender 2017-07-26 21:34:44 +02:00
parent 1961ffaea8
commit 79b6f470af
11 changed files with 20 additions and 21 deletions

View file

@ -1,13 +1,13 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.10.0",
"mediawiki/mediawiki-codesniffer": "0.10.1",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p"
"phpcs -p -s"
],
"fix": [
"phpcbf"

View file

@ -227,7 +227,7 @@ class EchoAttributeManager {
*
* @param User
* @param string A notification category defined in $wgEchoNotificationCategories
* @return boolean
* @return bool
*/
public function getCategoryEligibility( $user, $category ) {
$usersGroups = $user->getGroups();
@ -245,7 +245,7 @@ class EchoAttributeManager {
* Get the priority for a specific notification type
*
* @param string A notification type defined in $wgEchoNotifications
* @return integer From 1 to 10 (10 is default)
* @return int From 1 to 10 (10 is default)
*/
public function getNotificationPriority( $notificationType ) {
$category = $this->getNotificationCategory( $notificationType );
@ -257,7 +257,7 @@ class EchoAttributeManager {
* Get the priority for a notification category
*
* @param string A notification category defined in $wgEchoNotificationCategories
* @return integer From 1 to 10 (10 is default)
* @return int From 1 to 10 (10 is default)
*/
public function getCategoryPriority( $category ) {
if ( isset( $this->categories[$category]['priority'] ) ) {

View file

@ -107,7 +107,7 @@ class EchoContainmentSet {
* Test the wrapped lists for existence of $value
*
* @param $value mixed The value to look for
* @return boolean True when the set contains the provided value
* @return bool True when the set contains the provided value
*/
public function contains( $value ) {
foreach ( $this->lists as $list ) {

View file

@ -232,7 +232,7 @@ class MWEchoNotifUser {
$eventTypesToLoad = $attributeManager->getUserEnabledEventsbySections( $this->mUser, 'web', [ $section ] );
}
$count = (int)$this->userNotifGateway->getCappedNotificationCount( $dbSource, $eventTypesToLoad, MWEchoNotifUser::MAX_BADGE_COUNT + 1 );
$count = (int)$this->userNotifGateway->getCappedNotificationCount( $dbSource, $eventTypesToLoad, self::MAX_BADGE_COUNT + 1 );
if ( $global ) {
$count = self::capNotificationCount( $count + $this->getForeignCount( $section ) );
@ -349,7 +349,7 @@ class MWEchoNotifUser {
/**
* Mark one or more notifications read for a user.
* @param $eventIds Array of event IDs to mark read
* @return boolean
* @return bool
*/
public function markRead( $eventIds ) {
$eventIds = array_filter( (array)$eventIds, 'is_numeric' );
@ -381,7 +381,7 @@ class MWEchoNotifUser {
/**
* Mark one or more notifications unread for a user.
* @param $eventIds Array of event IDs to mark unread
* @return boolean
* @return bool
*/
public function markUnRead( $eventIds ) {
$eventIds = array_filter( (array)$eventIds, 'is_numeric' );
@ -418,7 +418,7 @@ class MWEchoNotifUser {
* across multiple tables, we would visit this later
*
* @param string[] $sections
* @return boolean
* @return bool
*/
public function markAllRead( array $sections = [ EchoAttributeManager::ALL ] ) {
if ( wfReadOnly() ) {
@ -789,6 +789,6 @@ class MWEchoNotifUser {
* @return int Capped notification count
*/
public static function capNotificationCount( $number ) {
return min( $number, MWEchoNotifUser::MAX_BADGE_COUNT + 1 );
return min( $number, self::MAX_BADGE_COUNT + 1 );
}
}

View file

@ -209,7 +209,7 @@ class EchoNotificationController {
*
* @param EchoEvent $event The event to test for exclusion
* @param User $user recipient of the notification for per-user blacklists
* @return boolean True when the event agent is blacklisted
* @return bool True when the event agent is blacklisted
*/
public static function isBlacklistedByUser( EchoEvent $event, User $user ) {
global $wgEchoAgentBlacklist, $wgEchoPerUserBlacklist;
@ -277,7 +277,7 @@ class EchoNotificationController {
*
* @param EchoEvent $event The event to test for inclusion in whitelist
* @param User $user The user that owns the whitelist
* @return boolean True when the event agent is in the user whitelist
* @return bool True when the event agent is in the user whitelist
*/
public static function isWhitelistedByUser( EchoEvent $event, User $user ) {
$clusterCache = ObjectCache::getLocalClusterInstance();

View file

@ -57,7 +57,7 @@ trait EchoPresentationModelSectionTrait {
* This also returns false if the revision is deleted,
* even if there is a section, because the section can't
* be viewed in that case.
* @return boolean Whether there is a section
* @return bool Whether there is a section
*/
protected function hasSection() {
return (bool)$this->getRawSectionTitle();

View file

@ -35,7 +35,7 @@ class EchoUserNotificationGateway {
/**
* Mark notifications as read
* @param $eventIDs array
* @return boolean
* @return bool
*/
public function markRead( array $eventIDs ) {
if ( !$eventIDs ) {
@ -59,7 +59,7 @@ class EchoUserNotificationGateway {
/**
* Mark notifications as unread
* @param $eventIDs array
* @return boolean
* @return bool
*/
public function markUnRead( array $eventIDs ) {
if ( !$eventIDs ) {

View file

@ -347,7 +347,7 @@ class EchoNotificationMapper extends EchoAbstractMapper {
* Batch delete notifications by user and eventId offset
* @param User $user
* @param int $eventId
* @return boolean
* @return bool
*/
public function deleteByUserEventOffset( User $user, $eventId ) {
$dbw = $this->dbFactory->getEchoDb( DB_MASTER );

View file

@ -18,7 +18,7 @@ class EchoTargetPageMapper extends EchoAbstractMapper {
* Insert an EchoTargetPage instance into the database
*
* @param EchoTargetPage $targetPage
* @return boolean
* @return bool
*/
public function insert( EchoTargetPage $targetPage ) {
$dbw = $this->dbFactory->getEchoDb( DB_MASTER );

View file

@ -575,7 +575,7 @@ class EchoEvent extends EchoAbstractEntity implements Bundleable {
/**
* Determine whether an event can use the job queue, or should be immediate
* @return boolean
* @return bool
*/
public function getUseJobQueue() {
global $wgEchoNotifications;

View file

@ -14,8 +14,7 @@
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<arg name="encoding" value="utf8" />
<arg name="encoding" value="UTF-8" />
<arg name="extensions" value="php,php5,inc" />
<arg name="colors" />
<exclude-pattern>vendor</exclude-pattern>
</ruleset>