[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/367949 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2326cf81e907f2a02615f96f922b66fd2806defd
---
M composer.json
M includes/AttributeManager.php
M includes/ContainmentSet.php
M includes/NotifUser.php
M includes/controller/NotificationController.php
M includes/formatters/PresentationModelSectionTrait.php
M includes/gateway/UserNotificationGateway.php
M includes/mapper/NotificationMapper.php
M includes/mapper/TargetPageMapper.php
M includes/model/Event.php
M phpcs.xml
11 files changed, 20 insertions(+), 21 deletions(-)

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



diff --git a/composer.json b/composer.json
index 49c2a1c..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -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"
diff --git a/includes/AttributeManager.php b/includes/AttributeManager.php
index 8d30bda..7c9fb4c 100644
--- a/includes/AttributeManager.php
+++ b/includes/AttributeManager.php
@@ -227,7 +227,7 @@
 *
 * @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 @@
 * 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 @@
 * 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'] ) ) {
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
index 6bde088..70f2ef0 100644
--- a/includes/ContainmentSet.php
+++ b/includes/ContainmentSet.php
@@ -107,7 +107,7 @@
 * 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 ) {
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 751263f..72a13e5 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -232,7 +232,7 @@
$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 @@
/**
 * 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 @@
/**
 * 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 @@
 * across multiple tables, we would 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

2017-07-26 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367949 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
..

build: Updating mediawiki/mediawiki-codesniffer to 0.10.1

Change-Id: I2326cf81e907f2a02615f96f922b66fd2806defd
---
M composer.json
M includes/AttributeManager.php
M includes/ContainmentSet.php
M includes/NotifUser.php
M includes/controller/NotificationController.php
M includes/formatters/PresentationModelSectionTrait.php
M includes/gateway/UserNotificationGateway.php
M includes/mapper/NotificationMapper.php
M includes/mapper/TargetPageMapper.php
M includes/model/Event.php
M phpcs.xml
11 files changed, 20 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/49/367949/1

diff --git a/composer.json b/composer.json
index 49c2a1c..55507be 100644
--- a/composer.json
+++ b/composer.json
@@ -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"
diff --git a/includes/AttributeManager.php b/includes/AttributeManager.php
index 8d30bda..7c9fb4c 100644
--- a/includes/AttributeManager.php
+++ b/includes/AttributeManager.php
@@ -227,7 +227,7 @@
 *
 * @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 @@
 * 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 @@
 * 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'] ) ) {
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
index 6bde088..70f2ef0 100644
--- a/includes/ContainmentSet.php
+++ b/includes/ContainmentSet.php
@@ -107,7 +107,7 @@
 * 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 ) {
diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 751263f..72a13e5 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -232,7 +232,7 @@
$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 @@
/**
 * 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 @@
/**
 * 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 @@
 * across multiple