diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 051be8100b8..80e7191ba54 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -109,7 +109,7 @@ class AjaxDispatcher { * @suppress SecurityCheck-XSS * @param User $user */ - function performAction( User $user ) { + public function performAction( User $user ) { if ( empty( $this->mode ) ) { return; } diff --git a/includes/DeprecatedGlobal.php b/includes/DeprecatedGlobal.php index f64b26f0e28..2a507d55a80 100644 --- a/includes/DeprecatedGlobal.php +++ b/includes/DeprecatedGlobal.php @@ -38,7 +38,7 @@ class DeprecatedGlobal extends StubObject { } // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore,PSR2.Classes.PropertyDeclaration.ScopeMissing - function _newObject() { + public function _newObject() { /* Put the caller offset for wfDeprecated as 6, as * that gives the function that uses this object, since: * 1 = this function ( _newObject ) diff --git a/includes/EditPage.php b/includes/EditPage.php index fdca4131909..7bda705eda9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3312,7 +3312,7 @@ ERROR; * * @return OOUI\FieldLayout OOUI FieldLayout with Label and Input */ - function getSummaryInputWidget( $summary = "", $labelText = null, $inputAttrs = null ) { + public function getSummaryInputWidget( $summary = "", $labelText = null, $inputAttrs = null ) { $inputAttrs = OOUI\Element::configFromHtmlAttributes( $this->getSummaryInputAttributes( $inputAttrs ) ); diff --git a/includes/Html.php b/includes/Html.php index fe3cf3227aa..f11b5b61d5a 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -1063,7 +1063,7 @@ class Html { * @param string[] $urls * @return string */ - static function srcSet( array $urls ) { + public static function srcSet( array $urls ) { $candidates = []; foreach ( $urls as $density => $url ) { // Cast density to float to strip 'x', then back to string to serve diff --git a/includes/Linker.php b/includes/Linker.php index cb116143850..3e3de783afa 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1768,7 +1768,7 @@ class Linker { * @param string $trail * @return array */ - static function splitTrail( $trail ) { + public static function splitTrail( $trail ) { $regex = MediaWikiServices::getInstance()->getContentLanguage()->linkTrail(); $inside = ''; if ( $trail !== '' && preg_match( $regex, $trail, $m ) ) { diff --git a/includes/Revision.php b/includes/Revision.php index e10d2de3ac8..fb7a9a037f1 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -351,7 +351,7 @@ class Revision implements IDBAccessObject { * * @private */ - function __construct( $row, $queryFlags = 0, Title $title = null ) { + public function __construct( $row, $queryFlags = 0, Title $title = null ) { global $wgUser; if ( $row instanceof RevisionRecord ) { @@ -647,7 +647,7 @@ class Revision implements IDBAccessObject { * @return string|null Returns null if the specified audience does not have access to the * comment. */ - function getComment( $audience = self::FOR_PUBLIC, User $user = null ) { + public function getComment( $audience = self::FOR_PUBLIC, User $user = null ) { global $wgUser; if ( $audience === self::FOR_THIS_USER && !$user ) { @@ -1058,7 +1058,7 @@ class Revision implements IDBAccessObject { * @param int $flags * @return string|bool False if not found */ - static function getTimestampFromId( $title, $id, $flags = 0 ) { + public static function getTimestampFromId( $title, $id, $flags = 0 ) { return self::getRevisionStore()->getTimestampFromId( $id, $flags ); } @@ -1069,7 +1069,7 @@ class Revision implements IDBAccessObject { * @param int $id Page id * @return int */ - static function countByPageId( $db, $id ) { + public static function countByPageId( $db, $id ) { return self::getRevisionStore()->countRevisionsByPageId( $db, $id ); } @@ -1080,7 +1080,7 @@ class Revision implements IDBAccessObject { * @param Title $title * @return int */ - static function countByTitle( $db, $title ) { + public static function countByTitle( $db, $title ) { return self::getRevisionStore()->countRevisionsByTitle( $db, $title ); } diff --git a/includes/Status.php b/includes/Status.php index 7104dbcb61c..8101874c886 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -398,7 +398,7 @@ class Status extends StatusValue { * the caller's responsibility (otherwise it will just fall back to the global request context). * @return array */ - function __sleep() { + public function __sleep() { $keys = array_keys( get_object_vars( $this ) ); return array_diff( $keys, [ 'cleanCallback', 'messageLocalizer' ] ); } @@ -406,7 +406,7 @@ class Status extends StatusValue { /** * Sanitize the callback parameter on wakeup, to avoid arbitrary execution. */ - function __wakeup() { + public function __wakeup() { $this->cleanCallback = false; $this->messageLocalizer = null; } diff --git a/includes/TitleArray.php b/includes/TitleArray.php index 895b5a76b6e..af3ed8a7695 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -39,7 +39,7 @@ abstract class TitleArray implements Iterator { * page_latest (if those will be used). See Title::newFromRow. * @return TitleArrayFromResult */ - static function newFromResult( $res ) { + public static function newFromResult( $res ) { $array = null; if ( !Hooks::run( 'TitleArrayFromResult', [ &$array, $res ] ) ) { return null; diff --git a/includes/WebRequest.php b/includes/WebRequest.php index b6bcc95d83e..3e3924b4491 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -377,7 +377,7 @@ class WebRequest { * passed on as the value of this URL parameter * @return array Array of URL variables to interpolate; empty if no match */ - static function extractTitle( $path, $bases, $key = false ) { + public static function extractTitle( $path, $bases, $key = false ) { foreach ( (array)$bases as $keyValue => $base ) { // Find the part after $wgArticlePath $base = str_replace( '$1', '', $base ); diff --git a/includes/XmlSelect.php b/includes/XmlSelect.php index 45002e82f66..b778b05eb6f 100644 --- a/includes/XmlSelect.php +++ b/includes/XmlSelect.php @@ -102,7 +102,7 @@ class XmlSelect { * @param string|array|false $default * @return string */ - static function formatOptions( $options, $default = false ) { + public static function formatOptions( $options, $default = false ) { $data = ''; foreach ( $options as $label => $value ) {