Showing 11,545 of 11,545 total issues
Function bridge
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
Function set_up_html
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.set_up_html = function() {
var container_classes, container_props;
container_classes = ["chosen-container"];
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
if (this.inherit_select_classes && this.form_field.className) {
Function installModule
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function installModule (store, rootState, path, module, hot) {
var isRoot = !path.length;
var namespace = store._modules.getNamespace(path);
// register in namespace map
Method internalAllowed
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function internalAllowed(
string $action,
?PermissionStatus $status,
$limitRate,
?Block $userBlock
Method run
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run() {
$services = MediaWikiServices::getInstance();
$dbProvider = $services->getConnectionProvider();
$rowsPerQuery = $services->getMainConfig()->get( MainConfigNames::UpdateRowsPerQuery );
Method removeExpired
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function removeExpired( int $limit, bool $deleteOrphans = false ): void {
$dbr = $this->lbFactory->getReplicaDatabase();
$dbw = $this->lbFactory->getPrimaryDatabase();
$ticket = $this->lbFactory->getEmptyTransactionTicket( __METHOD__ );
Method fetch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function fetch( string $src, $integrity, string $moduleName ) {
if ( $integrity !== null ) {
$key = $this->cacheKey( $src, $integrity, $moduleName );
$data = $this->cacheGet( $key );
if ( $data ) {
Method newFilteringDispatcher
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function newFilteringDispatcher( TreeBuilder $treeBuilder, $nodeName ) {
return new class( $treeBuilder, $nodeName ) extends Dispatcher {
private $nodeName;
private $nodeDepth = 0;
private $seenTag = false;
Method applyFeaturesCompatibility
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function applyFeaturesCompatibility(
array $features, bool $addUnspecifiedFeatures = true, &$messages = ''
): array {
if ( isset( $features[ 'i18n-all-lists-margins' ] ) ) {
// Emit warning only. Key is supported as-is.
Method expandPackageFiles
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function expandPackageFiles( Context $context ) {
$hash = $context->getHash();
if ( isset( $this->expandedPackageFiles[$hash] ) ) {
return $this->expandedPackageFiles[$hash];
}
Method displayViewSourcePage
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function displayViewSourcePage( Content $content, string $errorMessage ): void {
$out = $this->context->getOutput();
$this->getHookRunner()->onEditPage__showReadOnlyForm_initial( $this, $out );
$out->setRobotPolicy( 'noindex,nofollow' );
Method outputPageStreamBatch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function outputPageStreamBatch( $results, $lastRow ) {
$rowCarry = null;
while ( true ) {
$slotRows = $this->getSlotRowBatch( $results, $rowCarry );
Method sendCommand
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendCommand( ...$args ) {
$args = str_replace( ' ', '%20', $args );
$cmd = implode( ' ', $args );
$status = $this->getConn();
if ( !$status->isOK() ) {
Method getPage
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getPage( ?int $pageId, ?int $revId, int $queryFlags = IDBAccessObject::READ_NORMAL ) {
if ( !$pageId && !$revId ) {
throw new InvalidArgumentException( '$pageId and $revId cannot both be 0 or null' );
}
Method __construct
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct( \stdClass $row, $content, bool $derived = false ) {
Assert::parameterType( [ 'Content', 'callable' ], $content, '$content' );
Assert::parameter(
property_exists( $row, 'slot_revision_id' ),
Method updateSlotsOn
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateSlotsOn(
RevisionRecord $revision,
RevisionSlotsUpdate $revisionSlotsUpdate,
IDatabase $dbw
): array {
Method getRelativeRevision
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getRelativeRevision( RevisionRecord $rev, $flags, $dir ) {
$op = $dir === 'next' ? '>' : '<';
$sort = $dir === 'next' ? 'ASC' : 'DESC';
$revisionIdValue = $rev->getId( $this->wikiId );
Method mergeViaCas
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
final protected function mergeViaCas( $key, callable $callback, $exptime, $attempts, $flags ) {
$attemptsLeft = $attempts;
do {
$token = self::PASS_BY_REF;
// Get the old value and CAS token from cache
Method __toString
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __toString() {
$status = $this->isOK() ? "OK" : "Error";
if ( count( $this->errors ) ) {
$errorcount = "collected " . ( count( $this->errors ) ) . " message(s) on the way";
} else {
Method get
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get( $key, $flags = 0 ) {
$args = func_get_args();
if ( $this->fieldHasFlags( $flags, self::READ_LATEST ) ) {
// If the latest write was a delete(), we do NOT want to fallback