Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -158,10 +158,16 @@ |
159 | 159 | * @param String $status |
160 | 160 | * @return bool |
161 | 161 | */ |
162 | | - public function isValidStatus( $status ) { |
| 162 | + public static function isValidStatus( $status ) { |
163 | 163 | return in_array( $status, self::getPossibleStates(), true ); |
164 | 164 | } |
165 | 165 | |
| 166 | + /** |
| 167 | + * @throws MWException |
| 168 | + * @param $status String, value in CodeRevision::getPossibleStates |
| 169 | + * @param $user User |
| 170 | + * @return bool |
| 171 | + */ |
166 | 172 | public function setStatus( $status, $user ) { |
167 | 173 | if ( !$this->isValidStatus( $status ) ) { |
168 | 174 | throw new MWException( "Tried to save invalid code revision status" ); |