Showing 11,545 of 11,545 total issues
Method mysqlConnect
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function mysqlConnect( $server, $user, $password, $db ) {
if ( !function_exists( 'mysqli_init' ) ) {
throw $this->newExceptionAfterConnectError(
"MySQLi functions missing, have you compiled PHP with the --with-mysqli option?"
);
Method newFromRow
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newFromRow( IReadableDatabase $db, $row ) {
if ( isset( $row->ipb_id ) ) {
return new DatabaseBlock( [
'address' => $row->ipb_address,
'wiki' => $this->wikiId,
Method runPrimaryTransactionIdleCallbacks
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function runPrimaryTransactionIdleCallbacks( $fname = __METHOD__ ) {
if ( $this->trxRoundStage === self::ROUND_COMMIT_CALLBACKS ) {
$type = IDatabase::TRIGGER_COMMIT;
} elseif ( $this->trxRoundStage === self::ROUND_ROLLBACK_CALLBACKS ) {
$type = IDatabase::TRIGGER_ROLLBACK;
Method getPortletsTemplateData
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getPortletsTemplateData() {
if ( $this->portletsCached ) {
return $this->portletsCached;
}
$portlets = [];
Method getCodex
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getCodex( $value ) {
$isDisabled = ( $this->mParams['disabled'] ?? false );
// Label
$labelDiv = '';
Method getTemplate
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getTemplate( $templateName ) {
$templateKey = $templateName . '|' . $this->compileFlags;
// If a renderer has already been defined for this template, reuse it
if ( isset( $this->renderers[$templateKey] ) &&
Method recursiveConvertRule
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function recursiveConvertRule( $text, $variant, &$startPos, $depth = 0 ) {
// Quick check (no function calls)
if ( $text[$startPos] !== '-' || $text[$startPos + 1] !== '{' ) {
throw new InvalidArgumentException( __METHOD__ . ': invalid input string' );
}
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$params = $this->extractRequestParams();
$alltitles = $this->getPageSet()->getGoodAndMissingTitlesByNamespace();
if ( empty( $alltitles[NS_CATEGORY] ) ) {
return;
Method getAllowedParams
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllowedParams( $flags = 0 ) {
$allGroups = $this->userGroupManager->listAllGroups();
if ( $flags & ApiBase::GET_VALUES_FOR_HELP ) {
sort( $allGroups );
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$out = $this->getOutput();
Method getFormFields
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getFormFields() {
// Get default from the subpage of Special page
$defaultName = $this->par;
$title = $defaultName ? Title::newFromText( $defaultName ) : null;
if ( $title ) {
Method undelete
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function undelete() {
if ( $this->getConfig()->get( MainConfigNames::UploadMaintenance )
&& $this->mTargetObj->getNamespace() === NS_FILE
) {
throw new ErrorPageError( 'undelete-error', 'filedelete-maintenance' );
Method execute
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
$this->addHelpLink( 'Help:Managing_files' );
Method getQueryInfoReal
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getQueryInfoReal( $table ) {
$dbr = $this->getDatabase();
$prefix = $table === 'oldimage' ? 'oi' : 'img';
$tables = [ $table, 'actor' ];
Method tryJobInsertions
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function tryJobInsertions( array $jobs, HashRing &$partitionRing, $flags ) {
$jobsLeft = [];
// Because jobs are spread across partitions, per-job de-duplication needs
// to use a consistent hash to avoid allowing duplicate jobs per partition.
Method getUserSig
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUserSig( UserIdentity $user, $nickname = false, $fancySig = null ) {
$username = $user->getName();
# If not given, retrieve from the user object.
if ( $nickname === false ) {
Method interwikiTransclude
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function interwikiTransclude( LinkTarget $link, $action ) {
if ( !$this->svcOptions->get( MainConfigNames::EnableScaryTranscluding ) ) {
return wfMessage( 'scarytranscludedisabled' )->inContentLanguage()->text();
}
Method store
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store( UserIdentity $user, array $updates ) {
// In core, only users with local accounts may have preferences
if ( !$user->getId() ) {
return false;
}
Method getWhere
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getWhere( IReadableDatabase $db, $key, $users, $useId = true ) {
$this->checkDeprecation( $key );
$tables = [];
$conds = [];
Method parseBodyData
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parseBodyData( RequestInterface $request ): ?array {
// Parse the body based on its content type
$contentType = $request->getBodyType();
// HACK: If the Handler uses a custom BodyValidator, the