Jeroen De Dauw has submitted this change and it was merged.

Change subject: Whitespace fixes: adhere to PHP code conventions.
......................................................................


Whitespace fixes: adhere to PHP code conventions.

A few whitespace fixes; trying to make the codebase lint-free.

Change-Id: Ie259ac88eb6ea1f4490a1bd7bd078eec8e84eae6
---
M EducationProgram.php
M EducationProgram.settings.php
M includes/Utils.php
M includes/actions/EditCourseAction.php
M includes/actions/RemoveReviewerAction.php
M includes/pagers/ArticleTable.php
M includes/pagers/CoursePager.php
M includes/pagers/StudentActivityPager.php
M includes/pagers/StudentPager.php
M includes/rows/EPArticle.php
M includes/rows/Org.php
M maintenance/importWEPData.php
M maintenance/importWEPFromDB.php
M tests/phpunit/EPArticleTest.php
14 files changed, 29 insertions(+), 29 deletions(-)

Approvals:
  Ragesoss: Looks good to me, but someone else must approve
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/EducationProgram.php b/EducationProgram.php
index 9960743..2dc3402 100644
--- a/EducationProgram.php
+++ b/EducationProgram.php
@@ -9,7 +9,7 @@
  *
  * The source code makes use of a number of terms different from but 
corresponding to those in the UI:
  * * Org instead of Institution
- * * CA for campus volunteer (formly "campus ambassador") 
+ * * CA for campus volunteer (formly "campus ambassador")
  * * OA for online volunteer (formly "online ambassador")
  * * Article is often used to refer to "article student associations" rather 
then the Article class.
  *
@@ -97,7 +97,7 @@
 $wgAutoloadClasses['EducationProgram\Events\EventGrouper']                     
= $dir . '/includes/Events/EventGrouper.php';
 $wgAutoloadClasses['EducationProgram\Events\EventQuery']                       
= $dir . '/includes/Events/EventQuery.php';
 $wgAutoloadClasses['EducationProgram\Events\EventStore']                       
= $dir . '/includes/Events/EventStore.php';
-$wgAutoloadClasses['EducationProgram\Events\RecentPageEventGrouper']= $dir . 
'/includes/Events/RecentPageEventGrouper.php';
+$wgAutoloadClasses['EducationProgram\Events\RecentPageEventGrouper'] = $dir . 
'/includes/Events/RecentPageEventGrouper.php';
 $wgAutoloadClasses['EducationProgram\Events\Timeline']                         
        = $dir . '/includes/Events/Timeline.php';
 $wgAutoloadClasses['EducationProgram\Events\TimelineGroup']            = $dir 
. '/includes/Events/TimelineGroup.php';
 
@@ -228,11 +228,11 @@
 $wgSpecialPageGroups['Articles']                                       = 
'education';
 $wgSpecialPageGroups['ManageCourses']                          = 'education';
 
-//Define named constants corresponding to the user roles introduced by the 
extension.
-define( 'EP_STUDENT', 0 );      //Students
-define( 'EP_INSTRUCTOR', 1 );   //Instructors
-define( 'EP_OA', 2 );           //Online volunteers
-define( 'EP_CA', 3 );           //Campus volunteers
+// Define named constants corresponding to the user roles introduced by the 
extension.
+define( 'EP_STUDENT', 0 );      // Students
+define( 'EP_INSTRUCTOR', 1 );   // Instructors
+define( 'EP_OA', 2 );           // Online volunteers
+define( 'EP_CA', 3 );           // Campus volunteers
 
 // API
 $wgAPIModules['deleteeducation']                                       = 
'EducationProgram\ApiDeleteEducation';
diff --git a/EducationProgram.settings.php b/EducationProgram.settings.php
index 197730e..d3c36bb 100644
--- a/EducationProgram.settings.php
+++ b/EducationProgram.settings.php
@@ -41,7 +41,7 @@
        'courseDescPage' => 'MediaWiki:Course description',
        'courseOrgDescPage' => '$2/$1', // $1 = org name, $2 = courseDescPage 
setting
        'useStudentRealNames' => false,
-       'timelineDurationLimit' => 5 *24 * 60 *60,
+       'timelineDurationLimit' => 5 * 24 * 60 * 60,
        'timelineCountLimit' => 200,
        'timelineUserLimit' => 3,
        'dykCategory' => 'MyCourses Did You Know',
diff --git a/includes/Utils.php b/includes/Utils.php
index 9127769..9ea18c6 100644
--- a/includes/Utils.php
+++ b/includes/Utils.php
@@ -195,7 +195,7 @@
 
                if ( $req->getSessionData( 'epfail' ) ) {
                        $out->addHTML(
-                               '<p class="visualClear errorbox">' . 
$req->getSessionData( 'epfail' ). '</p>'
+                               '<p class="visualClear errorbox">' . 
$req->getSessionData( 'epfail' ) . '</p>'
                                        . '<hr style="display: block; clear: 
both; visibility: hidden;" />'
                        );
                        $req->setSessionData( 'epfail', false );
diff --git a/includes/actions/EditCourseAction.php 
b/includes/actions/EditCourseAction.php
index fd3b13e..e709520 100644
--- a/includes/actions/EditCourseAction.php
+++ b/includes/actions/EditCourseAction.php
@@ -311,7 +311,7 @@
         */
        protected function handleKnownField( $name, $value ) {
                if ( in_array( $name, array( 'end', 'start' ) ) ) {
-                       $value = wfTimestamp( TS_MW, strtotime( $value. ' UTC' 
) );
+                       $value = wfTimestamp( TS_MW, strtotime( $value . ' UTC' 
) );
                }
 
                if ( $name === 'token' ) {
diff --git a/includes/actions/RemoveReviewerAction.php 
b/includes/actions/RemoveReviewerAction.php
index b56e08d..4480ce2 100644
--- a/includes/actions/RemoveReviewerAction.php
+++ b/includes/actions/RemoveReviewerAction.php
@@ -30,7 +30,7 @@
                $user = $this->getUser();
                $userIdToRemove = $req->getCheck( 'user-id' ) ? $req->getInt( 
'user-id' ) : $user->getId();
 
-               $salt = $userIdToRemove .'remreviewer' . $req->getInt( 
'article-id' );
+               $salt = $userIdToRemove . 'remreviewer' . $req->getInt( 
'article-id' );
 
                if ( $user->matchEditToken( $req->getText( 'token' ), $salt )
                        && ( $user->getId() === $userIdToRemove || 
$user->isAllowed( 'ep-remreviewer' ) ) ) {
diff --git a/includes/pagers/ArticleTable.php b/includes/pagers/ArticleTable.php
index b8a0b72..8af5d4d 100644
--- a/includes/pagers/ArticleTable.php
+++ b/includes/pagers/ArticleTable.php
@@ -590,7 +590,7 @@
                $userIds = array();
                $field = $this->table->getPrefixedField( 'user_id' );
 
-               foreach( $this->mResult as $student ) {
+               foreach ( $this->mResult as $student ) {
                        $userIds[] = $student->$field;
                        $this->articles[$student->$field] = array();
                }
diff --git a/includes/pagers/CoursePager.php b/includes/pagers/CoursePager.php
index 10a0927..ad14d70 100644
--- a/includes/pagers/CoursePager.php
+++ b/includes/pagers/CoursePager.php
@@ -325,7 +325,7 @@
                $orgIds = array();
                $field = $this->table->getPrefixedField( 'org_id' );
 
-               foreach( $this->mResult as $course ) {
+               foreach ( $this->mResult as $course ) {
                        $orgIds[] = $course->$field;
                }
 
diff --git a/includes/pagers/StudentActivityPager.php 
b/includes/pagers/StudentActivityPager.php
index 51339ea..09bab0f 100644
--- a/includes/pagers/StudentActivityPager.php
+++ b/includes/pagers/StudentActivityPager.php
@@ -192,7 +192,7 @@
                $userField = $this->table->getPrefixedField( 'user_id' );
                $courseField = $this->table->getPrefixedField( 'last_course' );
 
-               foreach( $this->mResult as $student ) {
+               foreach ( $this->mResult as $student ) {
                        $userIds[] = (int)$student->$userField;
                        $courseIds[] = (int)$student->$courseField;
                }
@@ -205,7 +205,7 @@
                                __METHOD__
                        );
 
-                       foreach( $result as $user ) {
+                       foreach ( $result as $user ) {
                                $real = $user->user_real_name === '' ? 
$user->user_name : $user->user_real_name;
                                $this->userNames[$user->user_id] = array( 
$user->user_name, $real );
                        }
diff --git a/includes/pagers/StudentPager.php b/includes/pagers/StudentPager.php
index f0c835e..ca5ba49 100644
--- a/includes/pagers/StudentPager.php
+++ b/includes/pagers/StudentPager.php
@@ -158,7 +158,7 @@
                $userIds = array();
                $field = $this->table->getPrefixedField( 'user_id' );
 
-               foreach( $this->mResult as $student ) {
+               foreach ( $this->mResult as $student ) {
                        $userIds[] = (int)$student->$field;
                }
 
@@ -170,7 +170,7 @@
                                __METHOD__
                        );
 
-                       foreach( $result as $user ) {
+                       foreach ( $result as $user ) {
                                $real = $user->user_real_name === '' ? 
$user->user_name : $user->user_real_name;
                                $this->userNames[$user->user_id] = array( 
$user->user_name, $real );
                        }
@@ -191,7 +191,7 @@
                                )
                        );
 
-                       foreach( $result as $courseForUser ) {
+                       foreach ( $result as $courseForUser ) {
                                if ( !array_key_exists( 
$courseForUser->upc_user_id, $this->courseTitles ) ) {
                                        
$this->courseTitles[$courseForUser->upc_user_id] = array();
                                }
diff --git a/includes/rows/EPArticle.php b/includes/rows/EPArticle.php
index d7e0d04..b9301c9 100644
--- a/includes/rows/EPArticle.php
+++ b/includes/rows/EPArticle.php
@@ -198,7 +198,7 @@
         */
        public function addReviewers( array $userIds ) {
                $userIds = array_unique( $userIds );
-               $addedIds = array_diff( $userIds, $this->reviewers);
+               $addedIds = array_diff( $userIds, $this->reviewers );
 
                if ( !empty( $addedIds ) ) {
                        $this->reviewers = array_merge( $this->reviewers, 
$addedIds );
diff --git a/includes/rows/Org.php b/includes/rows/Org.php
index 0125b6f..21f8fcb 100644
--- a/includes/rows/Org.php
+++ b/includes/rows/Org.php
@@ -52,7 +52,7 @@
 
                foreach ( array( 'student_count', 'instructor_count', 
'oa_count', 'ca_count' ) as $field ) {
                        $fields[$field] = Courses::singleton()->rawSelectRow(
-                               array( 'SUM(' . 
Courses::singleton()->getPrefixedField( $field ). ') AS sum' ),
+                               array( 'SUM(' . 
Courses::singleton()->getPrefixedField( $field ) . ') AS sum' ),
                                Courses::singleton()->getPrefixedValues( array(
                                        'org_id' => $this->getId()
                                ) )
diff --git a/maintenance/importWEPData.php b/maintenance/importWEPData.php
index 1a2e48c..2202d5c 100644
--- a/maintenance/importWEPData.php
+++ b/maintenance/importWEPData.php
@@ -157,7 +157,7 @@
                                true
                        );
 
-                       try{
+                       try {
                                /**
                                 * @var RevisionedObject $course
                                 */
diff --git a/maintenance/importWEPFromDB.php b/maintenance/importWEPFromDB.php
index a4e5164..750c18c 100644
--- a/maintenance/importWEPFromDB.php
+++ b/maintenance/importWEPFromDB.php
@@ -54,13 +54,13 @@
 
                $conds = array(
                        'orgs' => array( 'university_country <> "India"' ),
-                       'courses'=> array(),
+                       'courses' => array(),
                        'students' => array(),
                );
 
                $tables = array(
                        'orgs' => 'imp_universities',
-                       'courses'=> 'imp_courses',
+                       'courses' => 'imp_courses',
                        'students' => 'imp_students',
                );
 
@@ -247,7 +247,7 @@
                        $currentId === false
                );
 
-               try{
+               try {
                        $courseObject->revisionedSave( $revAction );
                        $this->courseIds[$course->course_id] = 
$courseObject->getId();
                }
diff --git a/tests/phpunit/EPArticleTest.php b/tests/phpunit/EPArticleTest.php
index 6a0ae5d..1f1aee9 100644
--- a/tests/phpunit/EPArticleTest.php
+++ b/tests/phpunit/EPArticleTest.php
@@ -209,35 +209,35 @@
                );
 
                $argLists[] = array(
-                       array( 1, 2 ,3 ),
+                       array( 1, 2 , 3 ),
                        array( 1 ),
                        array( 1 ),
                        array( 2, 3 ),
                );
 
                $argLists[] = array(
-                       array( 1, 2 ,3 ),
+                       array( 1, 2 , 3 ),
                        array( 1, 3 ),
                        array( 1, 3 ),
                        array( 2 ),
                );
 
                $argLists[] = array(
-                       array( 1, 2 ,3 ),
+                       array( 1, 2 , 3 ),
                        array( 1, 3, 2 ),
                        array( 1, 3, 2 ),
                        array(),
                );
 
                $argLists[] = array(
-                       array( 1, 2 ,3 ),
+                       array( 1, 2 , 3 ),
                        array( 4, 2, 5, 3, 42 ),
                        array( 2, 3 ),
                        array( 1 ),
                );
 
                $argLists[] = array(
-                       array( 1, 2 ,3 ),
+                       array( 1, 2 , 3 ),
                        array( 1, 1, 1 ),
                        array( 1 ),
                        array( 2, 3 ),

-- 
To view, visit https://gerrit.wikimedia.org/r/94922
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie259ac88eb6ea1f4490a1bd7bd078eec8e84eae6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Ragesoss <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to