Showing 3,230 of 4,482 total issues
File filelist.js
has 2297 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later.
File Share.php
has 2250 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Bernhard Reiter <ockham@raz.or.at>
Function getItems
has a Cognitive Complexity of 275 (exceeds 5 allowed). Consider refactoring. Open
public static function getItems(
$itemType,
$item = null,
$shareType = null,
$shareWith = null,
- 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
File js.js
has 2043 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Disable console output unless DEBUG mode is enabled.
* Add
* 'debug' => true,
* To the definition of $CONFIG in config/config.php to enable debug mode.
Method changeSchema
has 984 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function changeSchema(Schema $schema, array $options) {
$prefix = $options['tablePrefix'];
if (!$schema->hasTable("{$prefix}addressbookchanges")) {
$addressBookChangesTable = $schema->createTable("{$prefix}addressbookchanges");
Function _generateHTML
has a Cognitive Complexity of 220 (exceeds 5 allowed). Consider refactoring. Open
$.datepicker._generateHTML = function( inst ) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
- 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
File View.php
has 1478 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Björn Schießle <bjoern@schiessle.org>
Method __construct
has 761 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($webRoot, \OC\Config $config) {
parent::__construct();
$this->webRoot = $webRoot;
$this->registerService('SettingsManager', function (Server $c) {
File Manager.php
has 1180 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Joas Schilling <coding@schilljs.com>
File jquery.fileupload.js
has 1170 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery File Upload Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
File Server.php
has 1168 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Bernhard Posselt <dev@bernhard-posselt.com>
File settings.js
has 1138 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later.
File Version20170101010100.php
has 993 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Philipp Schaffrath <pschaffrath@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
File UsersController.php
has 974 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Clark Tomlinson <fallen013@gmail.com>
* @author Joas Schilling <coding@schilljs.com>
File util.php
has 965 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Adam Williamson <awilliam@redhat.com>
* @author Andreas Fischer <bantu@owncloud.com>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
File CalDavBackend.php
has 957 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Joas Schilling <coding@schilljs.com>
* @author Stefan Weil <sw@weilnetz.de>
* @author Thomas Citharel <tcit@tcit.fr>
File file-upload.js
has 941 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2018
*
* This file is licensed under the Affero General Public License version 3
* or later.
File users.js
has 926 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Copyright (c) 2014, Arthur Schiwon <blizzz@owncloud.com>
* Copyright (c) 2014, Raghu Nayyar <beingminimal@gmail.com>
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
Function shareItem
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
$backend = self::getBackend($itemType);
$l = \OC::$server->getL10N('lib');
if ($backend->isShareTypeAllowed($shareType) === false) {
- 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
File Share20OcsController.php
has 872 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Viktar Dubiniuk <dubiniuk@owncloud.com>
*
* @copyright Copyright (c) 2019, ownCloud GmbH