resources/src/mediawiki.Uri/Uri.js
Function UriRelative
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mw.UriRelative = function ( documentLocation ) {
var getDefaultUri = ( function () {
// Cache
var href, uri;
Function Uri
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Uri( uri, options ) {
var prop, hrefCur,
hasOptions = ( options !== undefined ),
defaultUri = getDefaultUri();
Function parse
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse: function ( str, options ) {
var q, matches,
uri = this,
hasOwn = Object.prototype.hasOwnProperty;
Avoid deeply nested control flow statements. Open
Open
if ( Array.isArray( q[ k ] ) ) {
q[ k ].push( v );
}
Avoid deeply nested control flow statements. Open
Open
if ( typeof q[ k ] === 'string' ) {
q[ k ] = [ q[ k ] ];
}
Avoid deeply nested control flow statements. Open
Open
if ( Array.isArray( uri[ prop ] ) || $.isPlainObject( uri[ prop ] ) ) {
this[ prop ] = $.extend( true, {}, uri[ prop ] );
} else {
this[ prop ] = uri[ prop ];
}