Showing 3,230 of 4,482 total issues
File app.php
has 664 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Bernhard Posselt <dev@bernhard-posselt.com>
Function initialize
has 294 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function($searchBox, $searchResults) {
var self = this;
/**
File Storage.php
has 653 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Björn Schießle <bjoern@schiessle.org>
File Encryption.php
has 651 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Björn Schießle <bjoern@schiessle.org>
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
File DAV.php
has 650 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Bart Visscher <bartv@thisnet.nl>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Carlos Cerrillo <ccerrillo@gmail.com>
File shareitemmodel.js
has 645 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
Method shareItem
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function fileexists
has 280 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fileexists:function(data, original, replacement, controller) {
var self = this;
var dialogDeferred = new $.Deferred();
var getCroppedPreview = function(file) {
File Cache.php
has 627 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Andreas Fischer <bantu@owncloud.com>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Florin Peter <github@florin-peter.de>
File Google.php
has 612 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Adam Williamson <awilliam@redhat.com>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
Function initCore
has 267 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initCore() {
// setup tooltip
$('.section .icon-info').tooltip({placement: 'right'});
/**
Filesystem
has 71 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Filesystem {
/**
* @var Mount\Manager $mounts
*/
private static $mounts;
Method __construct
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($appName, $urlParams = []) {
parent::__construct();
$this['AppName'] = $appName;
$this['urlParams'] = $urlParams;
File SMB.php
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Jesús Macias <jmacias@solidgear.es>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
File CardDavBackend.php
has 591 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Georg Ehrke <georg@owncloud.com>
Manager
has 69 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Manager implements IManager {
/** @var IProviderFactory */
private $factory;
/** @var ILogger */
private $logger;
Function basicOperation
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
Open
private function basicOperation($operation, $path, $hooks = [], $extraParam = null) {
$postFix = (\substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
if (Filesystem::isValidPath($path)
and !Filesystem::isForbiddenFileOrDir($path)
- 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 checkServer
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function checkServer(\OCP\IConfig $config) {
$l = \OC::$server->getL10N('lib');
$errors = [];
$CONFIG_DATADIRECTORY = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data');
- 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 client.js
has 583 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
Function _generateHTML
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
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,