jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/367993 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 ...................................................................... build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 Change-Id: Ibc12768d9f9cd173b91089bd3bea850db98ba494 --- M EducationProgram.hooks.php M composer.json M includes/ArticleAdder.php M includes/ArticleStore.php M includes/CourseUndeletionHelper.php M includes/Events/Event.php M includes/Events/EventStore.php M includes/OrgDeletionHelper.php M includes/RevisionAction.php M includes/RevisionDiff.php M includes/RoleObject.php M includes/UserRolesMessage.php M includes/Utils.php M includes/actions/DeleteAction.php M includes/actions/DeleteOrgAction.php M includes/actions/EditAction.php M includes/actions/RestoreAction.php M includes/actions/UndeleteAction.php M includes/actions/UndoAction.php M includes/actions/ViewAction.php M includes/api/ApiDeleteEducation.php M includes/api/ApiEnlist.php M includes/notifications/CampusAddNotification.php M includes/notifications/CourseTalkNotification.php M includes/notifications/InstructorAddNotification.php M includes/notifications/NotificationsManager.php M includes/notifications/OnlineAddNotification.php M includes/notifications/StudentAddNotification.php M includes/pagers/EPPager.php M includes/rows/Course.php M includes/rows/EPArticle.php M includes/rows/EPRevision.php M includes/rows/Org.php M includes/rows/PageObject.php M includes/rows/RevisionedObject.php M includes/specials/SpecialAmbassadorProfile.php M includes/specials/SpecialEducationProgram.php M includes/specials/SpecialEnroll.php M includes/specials/VerySpecialPage.php M includes/tables/Orgs.php M includes/tables/PageTable.php M phpcs.xml 42 files changed, 74 insertions(+), 75 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index ae98a26..3d2ea69 100755 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -405,7 +405,7 @@ * @param string $error * @param string $reason * - * @return boolean + * @return bool */ public static function onAbortMove( Title $oldTitle, Title $newTitle, User $user, &$error, $reason diff --git a/composer.json b/composer.json index 579fe1f..91c6304 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "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": { diff --git a/includes/ArticleAdder.php b/includes/ArticleAdder.php index 52edb51..8c569a5 100644 --- a/includes/ArticleAdder.php +++ b/includes/ArticleAdder.php @@ -59,7 +59,7 @@ * @param string $pageTitle * @param int[] $reviewers Ids of the users that are reviewers for this article * - * @return boolean Indicates if the article was actually added. False means it already existed. + * @return bool Indicates if the article was actually added. False means it already existed. */ public function addArticle( $actionUser, $courseId, $userId, $pageId, $pageTitle, $reviewers = [] diff --git a/includes/ArticleStore.php b/includes/ArticleStore.php index 4d0c526..3eb1312 100644 --- a/includes/ArticleStore.php +++ b/includes/ArticleStore.php @@ -63,7 +63,7 @@ * * @param int|null $articleId * - * @return boolean + * @return bool */ public function hasArticle( $articleId ) { if ( is_null( $articleId ) ) { @@ -135,7 +135,7 @@ * * @param EPArticle $article * - * @return boolean + * @return bool * @throws InvalidArgumentException */ public function updateArticle( EPArticle $article ) { @@ -237,7 +237,7 @@ * * @param int $articleId * - * @return boolean Success indicator + * @return bool Success indicator */ public function deleteArticle( $articleId ) { return $this->getWriteConnection()->delete( @@ -258,7 +258,7 @@ * @param int $userId * @param int $pageId * - * @return boolean + * @return bool */ public function hasArticleWith( $courseId, $userId, $pageId ) { return $this->getReadConnection()->selectRow( @@ -281,7 +281,7 @@ * @param int[]|int $courseIds * @param int[]|int $userIds * - * @return boolean + * @return bool * @throws InvalidArgumentException */ public function deleteArticleByCourseAndUsers( $courseIds, $userIds ) { diff --git a/includes/CourseUndeletionHelper.php b/includes/CourseUndeletionHelper.php index a10e048..e0dafee 100644 --- a/includes/CourseUndeletionHelper.php +++ b/includes/CourseUndeletionHelper.php @@ -79,7 +79,7 @@ /** * Determine whether or not the course can be undeleted. * - * @return boolean + * @return bool */ public function checkRestrictions() { // Is the user allowed to edit this page? diff --git a/includes/Events/Event.php b/includes/Events/Event.php index 78c3af0..fdb7d6f 100644 --- a/includes/Events/Event.php +++ b/includes/Events/Event.php @@ -127,7 +127,7 @@ * * @since 0.3 * - * @return integer + * @return int */ public function getAge() { return time() - (int)wfTimestamp( TS_UNIX, $this->time ); diff --git a/includes/Events/EventStore.php b/includes/Events/EventStore.php index b6600d8..205bf04 100644 --- a/includes/Events/EventStore.php +++ b/includes/Events/EventStore.php @@ -156,7 +156,7 @@ * * @param Event $event * - * @return boolean SuccessIndicator + * @return bool SuccessIndicator * @throws InvalidArgumentException */ public function insertEvent( Event $event ) { diff --git a/includes/OrgDeletionHelper.php b/includes/OrgDeletionHelper.php index ef844eb..2ce6ac2 100644 --- a/includes/OrgDeletionHelper.php +++ b/includes/OrgDeletionHelper.php @@ -52,7 +52,7 @@ * Note: queries performed here should be optimized/use only summary data, * as this method may be called by OrgPager once per row displayed. * - * @return boolean + * @return bool */ public function checkRestrictions() { if ( $this->deletionCheck === OrgDelCheck::NOT_CHECKED ) { diff --git a/includes/RevisionAction.php b/includes/RevisionAction.php index 4d69f74..0858a8f 100644 --- a/includes/RevisionAction.php +++ b/includes/RevisionAction.php @@ -26,7 +26,7 @@ /** * @since 0.1 - * @return boolean + * @return bool */ public function isMinor() { return $this->isMinor; @@ -34,7 +34,7 @@ /** * @since 0.1 - * @return boolean + * @return bool */ public function isDelete() { return $this->isDelete; diff --git a/includes/RevisionDiff.php b/includes/RevisionDiff.php index d53b478..7c9f3a8 100644 --- a/includes/RevisionDiff.php +++ b/includes/RevisionDiff.php @@ -38,7 +38,7 @@ $sourceObject = $revision->getObject(); $fields = is_null( $fields ) ? $sourceObject->getFieldNames() : $fields; - $changedFields = RevisionDiff::compareFields( + $changedFields = self::compareFields( $sourceObject, $targetObject, $fields @@ -55,7 +55,7 @@ $targetObject = $revision->getObject(); $fields = is_null( $fields ) ? $targetObject->getFieldNames() : $fields; - $changedFields = RevisionDiff::compareFields( + $changedFields = self::compareFields( $sourceObject, $targetObject, $fields ); diff --git a/includes/RoleObject.php b/includes/RoleObject.php index d281d8b..01979b4 100644 --- a/includes/RoleObject.php +++ b/includes/RoleObject.php @@ -224,7 +224,7 @@ * * @param array $conditions * - * @return boolean + * @return bool */ public function hasCourse( array $conditions = [] ) { $courseTable = Courses::singleton(); @@ -335,7 +335,7 @@ * * @param int $userId * @param RoleObject $roleObjectArray - * @return boolean + * @return bool */ public static function isInRoleObjArray( $userId, $roleObjectArray ) { foreach ( $roleObjectArray as $roleObject ) { diff --git a/includes/UserRolesMessage.php b/includes/UserRolesMessage.php index fca392d..2b0b2b6 100644 --- a/includes/UserRolesMessage.php +++ b/includes/UserRolesMessage.php @@ -136,7 +136,7 @@ * Note: you must call prepare() before calling this method. Unless you know * that the user has roles, call this method before calling output(). * - * @return boolean true if the user has roles, false if not + * @return bool true if the user has roles, false if not */ public function userHasRoles() { return ( count( $this->rolesAndCourses ) > 0 ); diff --git a/includes/Utils.php b/includes/Utils.php index aae2903..fff098e 100644 --- a/includes/Utils.php +++ b/includes/Utils.php @@ -253,10 +253,10 @@ * * @param string|Title $title * - * @return boolean + * @return bool */ public static function isCourse( $title ) { - return strpos( Utils::getStrFromTitleOrStr( $title ), '/' ) + return strpos( self::getStrFromTitleOrStr( $title ), '/' ) !== false; } @@ -273,7 +273,7 @@ */ public static function parseCourseTitle( $title ) { preg_match( '/^.*:(.*)\/(.*) \((.*)\)$/', - Utils::getStrFromTitleOrStr( $title ), + self::getStrFromTitleOrStr( $title ), $matches ); return [ @@ -291,10 +291,10 @@ * @since 0.4 alpha * * @param string|Title $title - * @return boolean + * @return bool */ public static function isCourseSubPage( $title ) { - return substr_count( Utils::getStrFromTitleOrStr( $title ), '/' ) + return substr_count( self::getStrFromTitleOrStr( $title ), '/' ) > 1; } diff --git a/includes/actions/DeleteAction.php b/includes/actions/DeleteAction.php index 0d35ebd..a9e738d 100644 --- a/includes/actions/DeleteAction.php +++ b/includes/actions/DeleteAction.php @@ -111,7 +111,7 @@ * @param PageObject $pageObj The object (so far, Org or Course) to be * deleted. * - * @return boolean + * @return bool */ protected function checkAndHandleRestrictions( $pageObj ) { return true; @@ -124,7 +124,7 @@ * * @param PageObject $object * - * @return boolean Success indicator + * @return bool Success indicator */ protected function doDelete( PageObject $object ) { $revAction = new RevisionAction(); diff --git a/includes/actions/DeleteOrgAction.php b/includes/actions/DeleteOrgAction.php index 8c5f20b..8f25eb3 100644 --- a/includes/actions/DeleteOrgAction.php +++ b/includes/actions/DeleteOrgAction.php @@ -26,7 +26,7 @@ * * @param Org $org The Org to be deleted. * - * @return boolean + * @return bool */ protected function checkAndHandleRestrictions( $org ) { $deletionHelper = new OrgDeletionHelper( $org, $this->context ); diff --git a/includes/actions/EditAction.php b/includes/actions/EditAction.php index 394028d..354443d 100644 --- a/includes/actions/EditAction.php +++ b/includes/actions/EditAction.php @@ -170,7 +170,7 @@ * * @since 0.1 * - * @return boolean + * @return bool */ protected function isNew() { if ( is_null( $this->isNew ) ) { diff --git a/includes/actions/RestoreAction.php b/includes/actions/RestoreAction.php index 07668b7..2d84b4f 100644 --- a/includes/actions/RestoreAction.php +++ b/includes/actions/RestoreAction.php @@ -120,7 +120,7 @@ * @param PageObject $object * @param EPRevision $revision * - * @return boolean Success indicator + * @return bool Success indicator */ protected function doRestore( PageObject $object, EPRevision $revision ) { $success = $object->restoreToRevision( $revision ); diff --git a/includes/actions/UndeleteAction.php b/includes/actions/UndeleteAction.php index cca76d8..1df221c 100644 --- a/includes/actions/UndeleteAction.php +++ b/includes/actions/UndeleteAction.php @@ -121,7 +121,7 @@ * * @param EPRevision $revision The latest revision of the object to undelete * - * @return boolean + * @return bool */ protected function checkAndHandleRestrictions( $revision ) { // only worrying about restrictions for courses, specifically @@ -150,7 +150,7 @@ * * @param EPRevision $revision * - * @return boolean Success indicator + * @return bool Success indicator */ protected function doUndelete( EPRevision $revision ) { $revAction = new RevisionAction(); diff --git a/includes/actions/UndoAction.php b/includes/actions/UndoAction.php index d978fc0..227f6e0 100644 --- a/includes/actions/UndoAction.php +++ b/includes/actions/UndoAction.php @@ -120,7 +120,7 @@ * @param PageObject $object * @param EPRevision $revision * - * @return boolean Success indicator + * @return bool Success indicator */ protected function doUndo( PageObject $object, EPRevision $revision ) { $success = $object->undoRevision( $revision ); diff --git a/includes/actions/ViewAction.php b/includes/actions/ViewAction.php index 74f97bd..8ffcc94 100644 --- a/includes/actions/ViewAction.php +++ b/includes/actions/ViewAction.php @@ -60,7 +60,7 @@ * * @since 0.2 * - * @return boolean + * @return bool */ public function requiresUnblock() { return false; diff --git a/includes/api/ApiDeleteEducation.php b/includes/api/ApiDeleteEducation.php index f44712b..0b4151f 100644 --- a/includes/api/ApiDeleteEducation.php +++ b/includes/api/ApiDeleteEducation.php @@ -107,7 +107,7 @@ * @param string $type * @param array $params * - * @return boolean + * @return bool */ protected function userIsAllowed( $type, array $params ) { return $this->getUser()->isAllowed( 'ep-' . $type ); diff --git a/includes/api/ApiEnlist.php b/includes/api/ApiEnlist.php index c36b184..7cc27d2 100644 --- a/includes/api/ApiEnlist.php +++ b/includes/api/ApiEnlist.php @@ -121,7 +121,7 @@ * @param string $role * @param string $subAction * - * @return boolean + * @return bool */ protected function userIsAllowed( $userId, $role, $subAction ) { $user = $this->getUser(); diff --git a/includes/notifications/CampusAddNotification.php b/includes/notifications/CampusAddNotification.php index 397ed95..60ec337 100644 --- a/includes/notifications/CampusAddNotification.php +++ b/includes/notifications/CampusAddNotification.php @@ -22,7 +22,7 @@ * @see EducationProgram.INotificationType::getKey() */ public function getKey() { - return CampusAddNotification::KEY; + return self::KEY; } } diff --git a/includes/notifications/CourseTalkNotification.php b/includes/notifications/CourseTalkNotification.php index 76bd03d..0e10655 100644 --- a/includes/notifications/CourseTalkNotification.php +++ b/includes/notifications/CourseTalkNotification.php @@ -21,7 +21,7 @@ * @see EducationProgram.INotificationType::getKey() */ public function getKey() { - return CourseTalkNotification::KEY; + return self::KEY; } /** @@ -87,7 +87,7 @@ } $eventParams = [ - 'type' => CourseTalkNotification::KEY, + 'type' => self::KEY, 'title' => $title, 'agent' => $params['agent'], ]; diff --git a/includes/notifications/InstructorAddNotification.php b/includes/notifications/InstructorAddNotification.php index 880b4a2..352617d 100644 --- a/includes/notifications/InstructorAddNotification.php +++ b/includes/notifications/InstructorAddNotification.php @@ -22,7 +22,7 @@ * @see EducationProgram.INotificationType::getKey() */ public function getKey() { - return InstructorAddNotification::KEY; + return self::KEY; } } diff --git a/includes/notifications/NotificationsManager.php b/includes/notifications/NotificationsManager.php index 51654e7..b7dcc3d 100644 --- a/includes/notifications/NotificationsManager.php +++ b/includes/notifications/NotificationsManager.php @@ -47,7 +47,7 @@ * @return string */ public function getCategoryKey() { - return NotificationsManager::CATEGORY; + return self::CATEGORY; } /** @@ -82,7 +82,7 @@ array &$icons ) { // register the category - $notificationCategories[NotificationsManager::CATEGORY] = [ + $notificationCategories[self::CATEGORY] = [ 'tooltip' => 'ep-echo-pref-tooltip', ]; @@ -93,7 +93,7 @@ $notifications[$typeKey] = array_merge( $params, [ - 'category' => NotificationsManager::CATEGORY, + 'category' => self::CATEGORY, ] ); diff --git a/includes/notifications/OnlineAddNotification.php b/includes/notifications/OnlineAddNotification.php index 4783ee5..006878e 100644 --- a/includes/notifications/OnlineAddNotification.php +++ b/includes/notifications/OnlineAddNotification.php @@ -22,7 +22,7 @@ * @see EducationProgram.INotificationType::getKey() */ public function getKey() { - return OnlineAddNotification::KEY; + return self::KEY; } } diff --git a/includes/notifications/StudentAddNotification.php b/includes/notifications/StudentAddNotification.php index 852021c..9e0363f 100644 --- a/includes/notifications/StudentAddNotification.php +++ b/includes/notifications/StudentAddNotification.php @@ -22,7 +22,7 @@ * @see EducationProgram.INotificationType::getKey() */ public function getKey() { - return StudentAddNotification::KEY; + return self::KEY; } } diff --git a/includes/pagers/EPPager.php b/includes/pagers/EPPager.php index 613a639..e567fa3 100644 --- a/includes/pagers/EPPager.php +++ b/includes/pagers/EPPager.php @@ -220,7 +220,7 @@ * * @since 0.1 * - * @return boolean + * @return bool */ protected function hasMultipleItemControl() { return count( $this->getMultipleItemActions() ) > 0; @@ -231,7 +231,7 @@ * * @since 0.1 * - * @return boolean + * @return bool */ protected function hasActionsColumn() { return true; @@ -433,7 +433,7 @@ * * @param array $filterOptions * - * @return boolean If anything was changed from the default + * @return bool If anything was changed from the default */ protected function addFilterValues( array &$filterOptions ) { $req = $this->getRequest(); diff --git a/includes/rows/Course.php b/includes/rows/Course.php index 24c3e17..26415f5 100644 --- a/includes/rows/Course.php +++ b/includes/rows/Course.php @@ -482,7 +482,7 @@ */ public static function getAddNewRegion( IContextSource $context, array $args = [] ) { if ( Orgs::singleton()->has() ) { - return Course::getAddNewControl( $context, $args ); + return self::getAddNewControl( $context, $args ); } else { return $context->msg( 'ep-courses-addorgfirst' )->parse(); } @@ -493,7 +493,7 @@ * * @since 0.1 * - * @return integer + * @return int */ public function getDaysLeft() { $timeLeft = (int)wfTimestamp( TS_UNIX, $this->getField( 'end' ) ) - time(); @@ -507,7 +507,7 @@ * * @since 0.1 * - * @return integer + * @return int */ public function getDaysPassed() { $daysPassed = time() - (int)wfTimestamp( TS_UNIX, $this->getField( 'start' ) ); diff --git a/includes/rows/EPArticle.php b/includes/rows/EPArticle.php index cf1cbbe..9ec2f1f 100644 --- a/includes/rows/EPArticle.php +++ b/includes/rows/EPArticle.php @@ -168,7 +168,7 @@ * * @param User $user * - * @return boolean + * @return bool */ public function canBecomeReviewer( User $user ) { if ( !array_key_exists( $user->getId(), $this->canBecomeReviwer ) ) { @@ -329,7 +329,7 @@ * * @param User $user * - * @return boolean + * @return bool */ public function userCanRemove( User $user ) { return $user->isAllowed( 'ep-remarticle' ) || $user->getId() === $this->getUserId(); diff --git a/includes/rows/EPRevision.php b/includes/rows/EPRevision.php index c04450d..6da7a3f 100644 --- a/includes/rows/EPRevision.php +++ b/includes/rows/EPRevision.php @@ -126,7 +126,7 @@ * * @since 0.1 * - * @return boolean + * @return bool */ public function isLatest() { return !$this->table->has( [ diff --git a/includes/rows/Org.php b/includes/rows/Org.php index c4a34c0..24cdc07 100644 --- a/includes/rows/Org.php +++ b/includes/rows/Org.php @@ -156,7 +156,7 @@ * @param string|null $functionName * * @throws ErrorPageErrorWithSelflink - * @return boolean Success indicator + * @return bool Success indicator */ public function save( $functionName = null ) { wfGetDB( DB_MASTER )->startAtomic( __METHOD__ ); @@ -298,7 +298,7 @@ * * @since 0.4 alpha * - * @return boolean + * @return bool */ public function isActive() { return $this->getField( 'last_active_date' ) > wfTimestampNow(); diff --git a/includes/rows/PageObject.php b/includes/rows/PageObject.php index a884bc5..3225854 100644 --- a/includes/rows/PageObject.php +++ b/includes/rows/PageObject.php @@ -110,7 +110,7 @@ /** * @since 0.2 * - * @return integer + * @return int */ public function getTouched() { return $this->getField( 'touched' ); diff --git a/includes/rows/RevisionedObject.php b/includes/rows/RevisionedObject.php index 0f757e6..5c2a478 100644 --- a/includes/rows/RevisionedObject.php +++ b/includes/rows/RevisionedObject.php @@ -98,7 +98,7 @@ * * @param RevisionedObject $object * - * @return boolean Success indicator + * @return bool Success indicator */ protected function storeRevision( RevisionedObject $object ) { if ( $this->storeRevisions && $this->revAction !== false ) { @@ -176,7 +176,7 @@ * When set to true, summary field changes are ignored. * Can also be an array of fields to ignore. * - * @return boolean + * @return bool */ protected function fieldsChanged( IORMRow $object, $excludeSummaryFields = false ) { $exclusionFields = []; @@ -258,7 +258,7 @@ * * @param RevisionAction $revAction * - * @return boolean Success indicator + * @return bool Success indicator */ public function revisionedSave( RevisionAction $revAction ) { $this->setRevisionAction( $revAction ); @@ -275,7 +275,7 @@ * * @param RevisionAction $revAction * - * @return boolean Success indicator + * @return bool Success indicator */ public function revisionedRemove( RevisionAction $revAction ) { $this->setRevisionAction( $revAction ); @@ -376,7 +376,7 @@ * * @param RevisionAction $revAction * - * @return boolean Success indicator + * @return bool Success indicator */ public function undelete( RevisionAction $revAction ) { $this->setRevisionAction( $revAction ); @@ -402,7 +402,7 @@ * @param EPRevision $revision * @param array|null $fields * - * @return boolean Success indicator + * @return bool Success indicator */ public function restoreToRevision( EPRevision $revision, array $fields = null ) { $diff = $this->getRestoreDiff( $revision, $fields ); @@ -463,7 +463,7 @@ * @param EPRevision $revision * @param array|null $fields * - * @return boolean Success indicator + * @return bool Success indicator */ public function undoRevision( EPRevision $revision, array $fields = null ) { $diff = $this->getUndoDiff( $revision, $fields ); @@ -516,7 +516,7 @@ * @param integer $revId * @param array|null $fields * - * @return boolean Success indicator + * @return bool Success indicator */ public function restoreToRevisionId( $revId, array $fields = null ) { $revision = $this->getRevisionById( $revId ); @@ -531,7 +531,7 @@ * @param integer $revId * @param array|null $fields * - * @return boolean Success indicator + * @return bool Success indicator */ public function undoRevisionId( $revId, array $fields = null ) { $revision = $this->getRevisionById( $revId ); diff --git a/includes/specials/SpecialAmbassadorProfile.php b/includes/specials/SpecialAmbassadorProfile.php index 9bc9575..66f4248 100644 --- a/includes/specials/SpecialAmbassadorProfile.php +++ b/includes/specials/SpecialAmbassadorProfile.php @@ -43,7 +43,7 @@ * * @since 0.1 * - * @return boolean + * @return bool */ public function isListed() { return $this->userCanAccess(); diff --git a/includes/specials/SpecialEducationProgram.php b/includes/specials/SpecialEducationProgram.php index 276a6ea..c971adc 100644 --- a/includes/specials/SpecialEducationProgram.php +++ b/includes/specials/SpecialEducationProgram.php @@ -125,7 +125,7 @@ * * @param integer $roleId * - * @return integer + * @return int */ protected function getRoleCount( $roleId ) { $dbr = wfGetDB( DB_SLAVE ); diff --git a/includes/specials/SpecialEnroll.php b/includes/specials/SpecialEnroll.php index 82fe087..3990894 100644 --- a/includes/specials/SpecialEnroll.php +++ b/includes/specials/SpecialEnroll.php @@ -239,7 +239,7 @@ * * @param Course $course * - * @return boolean Success indicator + * @return bool Success indicator */ protected function doEnroll( Course $course ) { $revAction = new RevisionAction(); diff --git a/includes/specials/VerySpecialPage.php b/includes/specials/VerySpecialPage.php index 77e0a19..8356ccf 100644 --- a/includes/specials/VerySpecialPage.php +++ b/includes/specials/VerySpecialPage.php @@ -55,7 +55,7 @@ * * @param string|null $subPage * - * @return boolean + * @return bool */ public function execute( $subPage ) { $this->cacheEnabled = Settings::get( 'enablePageCache' ); diff --git a/includes/tables/Orgs.php b/includes/tables/Orgs.php index 47f21c5..c822680 100644 --- a/includes/tables/Orgs.php +++ b/includes/tables/Orgs.php @@ -166,7 +166,7 @@ * * @since 0.4 alpha * - * @return boolean + * @return bool */ public function getReadMasterForSummaries() { return $this->read_master_for_summaries; diff --git a/includes/tables/PageTable.php b/includes/tables/PageTable.php index 263e3a2..dd58101 100644 --- a/includes/tables/PageTable.php +++ b/includes/tables/PageTable.php @@ -74,7 +74,7 @@ * * @param string $identifier * - * @return boolean + * @return bool */ public function hasIdentifier( $identifier ) { return $this->has( [ $this->getIdentifierField() => $identifier ] ); @@ -119,7 +119,7 @@ * @param RevisionAction $revAction * @param array $conditions * - * @return boolean + * @return bool */ public function deleteAndLog( RevisionAction $revAction, array $conditions ) { $objects = $this->select( diff --git a/phpcs.xml b/phpcs.xml index 5557452..737a6bb 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -10,6 +10,7 @@ <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" /> <exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" /> + <exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" /> <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> <exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" /> </rule> @@ -19,11 +20,9 @@ </properties> </rule> <rule ref="Generic.Files.LineLength"> - <exclude-pattern>EducationProgram.i18n.*.php</exclude-pattern> + <exclude-pattern>EducationProgram\.i18n\.*\.php</exclude-pattern> </rule> <file>.</file> <arg name="extensions" value="php,php5,inc" /> <arg name="encoding" value="UTF-8" /> - <exclude-pattern>vendor</exclude-pattern> - <exclude-pattern>node_modules</exclude-pattern> </ruleset> -- To view, visit https://gerrit.wikimedia.org/r/367993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc12768d9f9cd173b91089bd3bea850db98ba494 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits