r77349 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77348‎ | r77349 | r77350 >
Date:12:08, 27 November 2010
Author:reedy
Status:ok
Tags:
Comment:
Make isValidStatus static, add some documentation to setStatus
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -158,10 +158,16 @@
159159 * @param String $status
160160 * @return bool
161161 */
162 - public function isValidStatus( $status ) {
 162+ public static function isValidStatus( $status ) {
163163 return in_array( $status, self::getPossibleStates(), true );
164164 }
165165
 166+ /**
 167+ * @throws MWException
 168+ * @param $status String, value in CodeRevision::getPossibleStates
 169+ * @param $user User
 170+ * @return bool
 171+ */
166172 public function setStatus( $status, $user ) {
167173 if ( !$this->isValidStatus( $status ) ) {
168174 throw new MWException( "Tried to save invalid code revision status" );

Status & tagging log