Showing 11,545 of 11,545 total issues
Method loadFiles
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function loadFiles(): void {
# Allow media handling extensions adding MIME-types and MIME-info
if ( $this->initCallback ) {
call_user_func( $this->initCallback, $this );
}
Method detectMimeType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function detectMimeType( string $file, $ext = true ): string {
/** @todo Make $ext default to false. Or better, remove it. */
if ( $ext ) {
$this->logger->info( __METHOD__ .
": WARNING: use of the \$ext parameter is deprecated. "
Method replaceLostConnection
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function replaceLostConnection( $lastErrno, $fname ) {
if ( $this->conn ) {
$this->closeConnection();
$this->conn = null;
$this->handleSessionLossPreconnect();
Method reallyDoQuery
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reallyDoQuery( $offset, $limit, $order ) {
[ $tables, $fields, $conds, $fname, $options, $join_conds ] = $this->buildQueryInfo(
$offset,
$limit,
$order
Method getInputHTML
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getInputHTML( $value ) {
$valInSelect = false;
if ( $value !== false ) {
$value = strval( $value );
Method getTableRow
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTableRow( $value ) {
[ $errors, $errorClass ] = $this->getErrorsAndErrorClass( $value );
$inputHtml = $this->getInputHTML( $value );
$fieldType = $this->getClassName();
$helptext = $this->getHelpTextHtmlTable( $this->getHelpText() );
Method __construct
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct( $repoDir, $usePrecomputed = true ) {
$this->repoDir = $repoDir;
$services = MediaWikiServices::getInstance();
$this->options = new ServiceOptions(
self::CONSTRUCTOR_OPTIONS, $services->getMainConfig()
Method read
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function read() {
$keepReading = $this->reader->read();
/* Skip until first element */
while ( $keepReading && $this->reader->nodeType !== XMLReader::ELEMENT ) {
Method handleReauthBeforeExecute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function handleReauthBeforeExecute( $subPage ) {
$authManager = $this->getAuthManager();
$request = $this->getRequest();
$key = 'AuthManagerSpecialPage:reauth:' . $this->getName();
Method format
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function format( string $format ): string {
$string = $this->fetchMessage();
if ( $string === false ) {
// Err on the side of safety, ensure that the output
Method loadExtensions
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function loadExtensions() {
if ( $this->autoExtensionHookContainer ) {
// Already injected by installer
return $this->autoExtensionHookContainer;
}
Method getCacheKey
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getCacheKey( $page, $passThrough = false ) {
if ( is_string( $page ) ) {
if ( $passThrough ) {
return $page;
} else {
Method getLocalSettings
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getLocalSettings() {
$dir = LocalSettingsGenerator::escapePhpString( $this->getVar( 'wgSQLiteDataDir' ) );
// These tables have frequent writes and are thus split off from the main one.
// Since the code using these tables only uses transactions for writes, then set
// them to using BEGIN IMMEDIATE. This avoids frequent lock errors on the first write action.
Method getContinuation
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getContinuation() {
$data = [];
$batchcomplete = false;
$finishedModules = array_diff(
Method execute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$params = $this->extractRequestParams();
$opt = 0;
if ( $this->isRaw ) {
Method execute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$params = $this->extractRequestParams();
$this->requireAtLeastOneParameter( $params, 'continue', 'returnurl' );
Method createFeedItem
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createFeedItem( $info ) {
if ( !isset( $info['title'] ) ) {
// Probably a revdeled log entry, skip it.
return null;
}
Method run
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
// Since 'filterredir" will always be set in $params, we have to dig
// into the WebRequest to see if it was actually passed.
Method execute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->useTransactionalTimeLimit();
$this->checkPermissions();
$this->checkReadOnly();
Method processAsyncUpload
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function processAsyncUpload() {
// Ensure the upload we're dealing with is an UploadFromUrl
if ( !$this->mUpload instanceof \UploadFromUrl ) {
$this->showUploadError( $this->msg( 'uploaderror' )->escaped() );