Showing 3,236 of 4,502 total issues
File admin-apps.js
has 555 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global Handlebars */
Handlebars.registerHelper('score', function() {
if(this.score) {
var score = Math.round( this.score / 10 );
Function fileexists
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
fileexists:function(data, original, replacement, controller) {
var self = this;
var dialogDeferred = new $.Deferred();
var getCroppedPreview = function(file) {
- 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 updateIcons
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
updateIcons:function(itemType, fileList){
var item;
var $fileList;
var currentDir;
if (!fileList && OCA.Files) {
- 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 Tags.php
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Bernhard Reiter <ockham@raz.or.at>
* @author derkostka <sebastian.kostka@gmail.com>
* @author Joas Schilling <coding@schilljs.com>
Common
has 61 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Common implements Storage, ILockingStorage, IVersionedStorage, IPersistentLockingStorage {
use LocalTempFileTrait;
protected $cache;
protected $scanner;
Method __construct
has 219 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(array $urlParams=[]) {
parent::__construct('settings', $urlParams);
$container = $this->getContainer();
File Filesystem.php
has 530 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Christopher Schäpers <kondou@ts.unde.re>
LazyRoot
has 60 functions (exceeds 20 allowed). Consider refactoring. Open
class LazyRoot implements IRootFolder {
/** @var \Closure */
private $rootFolderClosure;
/** @var IRootFolder */
File sharedialogview.js
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
Function fopen
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
public function fopen($path, $mode) {
// check if the file is stored in the array cache, this means that we
// copy a file over to the versions folder, in this case we don't want to
// decrypt it
if ($this->arrayCache->hasKey('encryption_copy_version_' . $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
Method put
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function put(
$itemType,
$itemSource,
$shareType,
$shareWith,
Wrapper
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IPersistentLockingStorage {
/**
* @var \OC\Files\Storage\Storage $storage
*/
protected $storage;
File File.php
has 511 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Bart Visscher <bartv@thisnet.nl>
* @author Björn Schießle <bjoern@schiessle.org>
* @author Jakob Sack <mail@jakobsack.de>
Function initCore
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
function initCore() {
// setup tooltip
$('.section .icon-info').tooltip({placement: 'right'});
/**
- 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 Common.php
has 510 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 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(IRequest $request, $baseUri) {
$this->request = $request;
$this->baseUri = $baseUri;
$logger = OC::$server->getLogger();
$dispatcher = OC::$server->getEventDispatcher();
Function put
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
private static function put(
$itemType,
$itemSource,
$shareType,
$shareWith,
- 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 listAllApps
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public static function listAllApps(bool $listEveryApp = false) {
$installedApps = OC_App::getAllApps();
//TODO which apps do we want to blacklist and how do we integrate
// blacklisting with the multi apps folder feature?
- 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
Share
has 56 functions (exceeds 20 allowed). Consider refactoring. Open
class Share extends Constants {
/** CRUDS permissions (Create, Read, Update, Delete, Share) using a bitmask
* Construct permissions for share() and setPermissions with Or (|) e.g.
* Give user read and update permissions: PERMISSION_READ | PERMISSION_UPDATE
*
File fileactions.js
has 499 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.