Showing 611 of 611 total issues
Avoid too many return
statements within this function. Open
return ret == null ? undefined : ret;
Avoid too many return
statements within this function. Open
return select( selector.replace( rtrim, "$1" ), context, results, seed );
Avoid too many return
statements within this function. Open
return ( context || root ).find( selector );
Avoid too many return
statements within this function. Open
return ret;
Avoid too many return
statements within this function. Open
return key === undefined || hasOwn.call( obj, key );
Avoid too many return
statements within this function. Open
return elem[ name ];
Avoid too many return
statements within this function. Open
import e from"jquery";function _typeof(e){_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};return _typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||false;n.configurable=true;"value"in n&&(n.writable=true);Object.defineProperty(e,n.key,n)}}function _createClass(e,t,i){t&&_defineProperties(e.prototype,t);i&&_defineProperties(e,i);return e}function _inherits(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if("function"===typeof Proxy)return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return true}catch(e){return false}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _createSuper(e){var t=_isNativeReflectConstruct();return function _createSuperInternal(){var i,n=_getPrototypeOf(e);if(t){var s=_getPrototypeOf(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _superPropBase(e,t){while(!Object.prototype.hasOwnProperty.call(e,t)){e=_getPrototypeOf(e);if(null===e)break}return e}function _get(e,t,i){_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,i){var n=_superPropBase(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(i):s.value}};return _get(e,t,i||e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var i=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n=[];var s=true;var a=false;var o,r;try{for(i=i.call(e);!(s=(o=i.next()).done);s=true){n.push(o.value);if(t&&n.length===t)break}}catch(e){a=true;r=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return n}}function _unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);return"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rtl(){return"rtl"===e("html").attr("dir")}
Avoid too many return
statements within this function. Open
return sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return this.constructor( context ).find( selector );
Avoid too many return
statements within this function. Open
return typeof root.ready !== "undefined" ?
root.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );
Similar blocks of code found in 2 locations. Consider refactoring. Open
function _setup(t,i){this.$element=t;this.options=e.extend({},Interchange.defaults,this.$element.data(),i);this.rules=[];this.currentPath="";this.className="Interchange";k.init(e);this._init();this._events()}},{key:"_init",value:function _init(){i._init();var e=this.$element[0].id||GetYoDigits(6,"interchange");this.$element.attr({"data-resize":e,id:e});this._parseOptions();this._addBreakpoints();this._generateRules();this._reflow()}},{key:"_events",value:function _events(){var e=this;this.$element.off("resizeme.zf.trigger").on("resizeme.zf.trigger",(function(){return e._reflow()}))}},{key:"_reflow",value:function _reflow(){var e;for(var t in this.rules)if(this.rules.hasOwnProperty(t)){var i=this.rules[t];window.matchMedia(i.query).matches&&(e=i)}e&&this.replace(e.path)}},{key:"_parseOptions",value:function _parseOptions(){var e=["auto","src","background","html"];if("undefined"===typeof this.options.type)this.options.type="auto";else if(-1===e.indexOf(this.options.type)){console.warn('Warning: invalid value "'.concat(this.options.type,'" for Interchange option "type"'));this.options.type="auto"}}},{key:"_addBreakpoints",value:function _addBreakpoints(){for(var e in i.queries)if(i.queries.hasOwnProperty(e)){var t=i.queries[e];Interchange.SPECIAL_QUERIES[t.name]=t.value}}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 45.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
*/},{key:"scrollToLoc",value:function scrollToLoc(e){this._inTransition=true;var t=this;var i={animationEasing:this.options.animationEasing,animationDuration:this.options.animationDuration,threshold:this.options.threshold,offset:this.options.offset};I.scrollToLoc(e,i,(function(){t._inTransition=false}))}},{key:"reflow",value:function reflow(){this.calcPoints();this._updateActive()}},{key:"_updateActive",value:function _updateActive(){var t=this;if(!this._inTransition){var i=parseInt(window.pageYOffset,10);var n=this.scrollPos>i;this.scrollPos=i;var s;if(i<this.points[0]-this.options.offset-(n?this.options.threshold:0));else if(i+this.winHeight===this.docHeight)s=this.points.length-1;else{var a=this.points.filter((function(e){return e-t.options.offset-(n?t.options.threshold:0)<=i}));s=a.length?a.length-1:0}var o=this.$active;var r="";if("undefined"!==typeof s){this.$active=this.$links.filter('[href="#'+this.$targets.eq(s).data("magellan-target")+'"]');this.$active.length&&(r=this.$active[0].getAttribute("href"))}else this.$active=e();var l=!(!this.$active.length&&!o.length)&&!this.$active.is(o);var c=r!==window.location.hash;if(l){o.removeClass(this.options.activeClass);this.$active.addClass(this.options.activeClass)}if(this.options.deepLinking&&c)if(window.history.pushState){var h=r||window.location.pathname+window.location.search;this.options.updateHistory?window.history.pushState({},"",h):window.history.replaceState({},"",h)}else window.location.hash=r;l&&this.$element.trigger("update.zf.magellan",[this.$active])}}},{key:"_destroy",value:function _destroy(){this.$element.off(".zf.trigger .zf.magellan").find(".".concat(this.options.activeClass)).removeClass(this.options.activeClass);if(this.options.deepLinking){var t=this.$active[0].getAttribute("href");window.location.hash.replace(t,"")}e(window).off("hashchange",this._deepLinkScroll);this.onLoadListener&&e(window).off(this.onLoadListener)}}]);return Magellan}(C);q.defaults={
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 45.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
}, historyUndo: function() {
var t3;
return (t3 = this.delegate) != null ? t3.inputControllerWillPerformUndo() : void 0;
}, insertCompositionText: function() {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 45.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Avoid too many return
statements within this function. Open
return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return JSON.parse(decodeURIComponent(value));
Similar blocks of code found in 2 locations. Consider refactoring. Open
_getCurrentSize:function _getCurrentSize(){var e;for(var t=0;t<this.queries.length;t++){var i=this.queries[t];window.matchMedia(i.value).matches&&(e=i)}return e&&this._getQueryName(e)},_watcher:function _watcher(){var t=this;e(window).on("resize.zf.trigger",(function(){var i=t._getCurrentSize(),n=t.current;if(i!==n){t.current=i;e(window).trigger("changed.zf.mediaquery",[i,n])}}))}};function parseStyleToObject(e){var t={};if("string"!==typeof e)return t;e=e.trim().slice(1,-1);if(!e)return t;t=e.split("&").reduce((function(e,t){var i=t.replace(/\+/g," ").split("=");var n=i[0];var s=i[1];n=decodeURIComponent(n);s="undefined"===typeof s?null:decodeURIComponent(s);e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s;return e}),{});return t}var n="6.7.5";var s={version:n,_plugins:{},_uuids:[],
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 45.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76