Set method visibility in some classes
Change-Id: I3c3d59d4b3edf2459efeac890721a43475e27198
This commit is contained in:
parent
800783d9ad
commit
925e3eb30b
10 changed files with 15 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ) ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue