Showing 759 of 1,838 total issues
Function show
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
show: function () {
if (!this.isShown && this.$element.hasClass('modal-gallery')) {
var modal = this.$element,
options = this.options,
windowWidth = $(window).width(),
Function _tabKeydown
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_tabKeydown: function( event ) {
var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
selectedIndex = this.tabs.index( focusedTab ),
goingForward = true;
Function _destroy
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_destroy: function() {
if ( this.xhr ) {
this.xhr.abort();
}
Function renderImageToCanvas
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadImage.renderImageToCanvas = function (img, canvas, width, height) {
var iw = img.width,
ih = img.height,
ctx = canvas.getContext('2d'),
vertSquashRatio,
Function buildPager
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildPager: function (pager) {
var gallery = this;
var numPages = this.getNumPages();
var page = this.getCurrentPage();
var startIndex = page * this.numThumbs;
Method smallworld_sociallinks
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smallworld_sociallinks($num, $name)
{
/** @var \XoopsModules\Smallworld\Helper $helper */
$helper = Helper::getInstance();
switch ($num) {
Method xoops_module_update_smallworld
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_smallworld(\XoopsModule $module)
{
$tables = new \Xmf\Database\Tables();
$cTable = 'config';
Function handle_file_upload
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function handle_file_upload($uploaded_file, $name, $size, $type, $error)
{
global $xoopsUser;
$file = new stdClass();
$db = new SmallWorldDB;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function xcopy
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function xcopy($source, $dest)
{
// Check for symlinks
if (is_link($source)) {
return symlink(readlink($source), $dest);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mergeImage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function mergeImage()
{
$dest = imagecreatefromjpeg($this->endFile);
$src = imagecreatefromjpeg($this->sourceFile);
if (4 == $this->mergeType) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function name
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = widget_slice.call( arguments, 1 ),
returnValue = this;
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
, show: function () {
var $tip
, inside
, pos
, actualWidth
Function refresh
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
refresh: function() {
var menus, items,
that = this,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
Function _drawMenu
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawMenu: function() {
var that = this;
// Create menu
this.menu = $( "<ul>", {
Function OEmbedProvider
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
xoops_smallworld.fn.oembed.OEmbedProvider = function (name, type, urlschemesarray, apiendpoint, extraSettings) {
this.name = name;
this.type = type; // "photo", "video", "link", "rich", null
this.urlschemes = urlschemesarray;
this.apiendpoint = apiendpoint;
Function appendHTML
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function appendHTML() {
if (!$box && document.body) {
init = false;
$window = $(window);
Function shake
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
var effectShake = $.effects.effect.shake = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
mode = $.effects.setMode( el, o.mode || "effect" ),
Function _onAdd
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onAdd: function (e, data) {
var that = this,
result = true,
options = $.extend({}, this.options, data),
limit = options.limitMultiFileUploads,
Function _makeResizable
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
_makeResizable: function (handles) {
handles = (handles === undefined ? this.options.resizable : handles);
var self = this,
options = self.options,
// .ui-resizable has position: relative defined in the stylesheet
Function _contactContainers
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
_contactContainers: function (event) {
// get innermost container that intersects with item
var innermostContainer = null, innermostIndex = null;