Decrease the number of 'function says it should return something' errors
authorMax Semenik <maxsem.wiki@gmail.com>
Thu, 15 Dec 2016 23:19:57 +0000 (15:19 -0800)
committerMax Semenik <maxsem.wiki@gmail.com>
Fri, 16 Dec 2016 00:05:52 +0000 (16:05 -0800)
Change-Id: Ib5115fe5bbaa67d8a6e54cc3ba1ba7020e239e11

includes/api/ApiHelp.php
includes/debug/MWDebug.php
includes/password/ParameterizedPassword.php
includes/password/Password.php
includes/search/SearchEngine.php
includes/specialpage/AuthManagerSpecialPage.php
tests/phan/config.php

index 2a6c938..9a0d3ff 100644 (file)
@@ -90,7 +90,6 @@ class ApiHelp extends ApiBase {
         * @param IContextSource $context
         * @param ApiBase[]|ApiBase $modules
         * @param array $options Formatting options (described above)
-        * @return string
         */
        public static function getHelp( IContextSource $context, $modules, array $options ) {
                global $wgContLang;
index dde678f..87656f2 100644 (file)
@@ -147,8 +147,6 @@ class MWDebug {
         * @param string $log 'production' will always trigger a php error, 'auto'
         *    will trigger an error if $wgDevelopmentWarnings is true, and 'debug'
         *    will only write to the debug log(s).
-        *
-        * @return mixed
         */
        public static function warning( $msg, $callerOffset = 1, $level = E_USER_NOTICE, $log = 'auto' ) {
                global $wgDevelopmentWarnings;
index c929797..78d624c 100644 (file)
@@ -79,7 +79,7 @@ abstract class ParameterizedPassword extends Password {
        }
 
        public function needsUpdate() {
-               return parent::needsUpdate() || $this->params !== $this->getDefaultParams();
+               return $this->params !== $this->getDefaultParams();
        }
 
        public function toString() {
index 13d1e6d..c8a0267 100644 (file)
@@ -138,8 +138,7 @@ abstract class Password {
         *
         * @return bool True if needs update, false otherwise
         */
-       public function needsUpdate() {
-       }
+       abstract public function needsUpdate();
 
        /**
         * Compare one Password object to this object
index 90bfebd..0bcb07a 100644 (file)
@@ -104,7 +104,6 @@ abstract class SearchEngine {
         * @since 1.18
         * @param string $feature
         * @param mixed $data
-        * @return bool
         */
        public function setFeatureData( $feature, $data ) {
                $this->features[$feature] = $data;
index bdf7638..fbc3022 100644 (file)
@@ -198,9 +198,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
         * @param string $subPage Subpage of the special page.
         * @return string an AuthManager::ACTION_* constant.
         */
-       protected function getDefaultAction( $subPage ) {
-               throw new BadMethodCallException( 'Subclass did not implement getDefaultAction' );
-       }
+       abstract protected function getDefaultAction( $subPage );
 
        /**
         * Return custom message key.
index afcd7f3..2c5eef7 100644 (file)
@@ -331,7 +331,7 @@ return [
                "PhanTypeMismatchProperty",
                // approximate error count: 95
                "PhanTypeMismatchReturn",
-               // approximate error count: 16
+               // approximate error count: 11
                "PhanTypeMissingReturn",
                // approximate error count: 5
                "PhanTypeNonVarPassByRef",