Merge "Fix flaky test BlockListPagerTest::testFormatValue"
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index b3e958f..6e545a6 100644 (file)
@@ -336,6 +336,10 @@ abstract class Maintenance {
         * @return bool
         */
        protected function hasArg( $argId = 0 ) {
+               if ( func_num_args() === 0 ) {
+                       wfDeprecated( __METHOD__ . ' without an $argId', '1.33' );
+               }
+
                return isset( $this->mArgs[$argId] );
        }
 
@@ -346,6 +350,10 @@ abstract class Maintenance {
         * @return mixed
         */
        protected function getArg( $argId = 0, $default = null ) {
+               if ( func_num_args() === 0 ) {
+                       wfDeprecated( __METHOD__ . ' without an $argId', '1.33' );
+               }
+
                return $this->hasArg( $argId ) ? $this->mArgs[$argId] : $default;
        }