Showing 3,235 of 4,503 total issues
Function newStorage
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
newStorage: function(storageConfig, onCompletion) {
var mountPoint = storageConfig.mountPoint;
var backend = this._allBackends[storageConfig.backend];
var isInvalidAuth = false;
File ja.js
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "現在のパスワードが間違っています",
"The new password cannot be the same as the previous one" : "新しいパスワードは前のパスワードと同じにできません",
File SystemTagManager.php
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Joas Schilling <coding@schilljs.com>
* @author Vincent Petry <pvince81@owncloud.com>
*
Trashbin
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Trashbin {
/**
* @var IURLGenerator
*/
private $urlGenerator;
AppManager
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AppManager implements IAppManager {
/**
* Apps with these types can not be enabled for certain groups only
* @var string[]
*/
File is.js
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Rangt núverandi lykilorð",
"The new password cannot be the same as the previous one" : "Nýja lykilorðið má ekki vera eins og það fyrra",
Function setupUploadEvents
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupUploadEvents: function(uploader) {
var self = this;
self._uploads = {};
Method expire
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function expire($filename, $uid) {
$config = \OC::$server->getConfig();
$expiration = self::getExpiration();
if ($config->getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' && $expiration->isEnabled()) {
Method getDirectoryContent
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDirectoryContent($directory, $mimetype_filter = '') {
$this->assertPathLength($directory);
if (!Filesystem::isValidPath($directory)) {
return [];
}
File commentstabview.js
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2016
*
* This file is licensed under the Affero General Public License version 3
* or later.
File Availability.php
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Robin Appelman <icewind@owncloud.com>
* @author Robin McCorkell <robin@mccorkell.me.uk>
*
File ConvertType.php
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* @author Andreas Fischer <bantu@owncloud.com>
* @author Bart Visscher <bartv@thisnet.nl>
* @author Joas Schilling <coding@schilljs.com>
Method updateShare
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateShare($id) {
if (!$this->shareManager->shareApiEnabled()) {
return new Result(null, 404, $this->l->t('Share API is disabled'));
}
Function init
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
private function init() {
if ($this->init) {
return;
}
$this->init = true;
- 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 match
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
public function match($url) {
if (\substr($url, 0, 6) === '/apps/') {
// empty string / 'apps' / $app / rest of the route
list(, , $app, ) = \explode('/', $url, 4);
- 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 ShareController.php
has 349 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>
Function addSelect2
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addSelect2 ($elements, userListLimit) {
if (!$elements.length) {
return;
}
$elements.select2({
File is.js
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
OC.L10N.register(
"core",
{
"Please select a file." : "Veldu einhverja skrá.",
"File is too big" : "Skrá er of stór",
Local
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Local extends Common {
protected $datadir;
protected $dataDirLength;
Request
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Request implements ArrayAccess, Countable, IRequest {
public const USER_AGENT_IE = '/(MSIE)|(Trident)/';
public const USER_AGENT_IE_8 = '/MSIE 8.0/';
// Microsoft Edge User Agent from https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
public const USER_AGENT_MS_EDGE = '/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/[0-9.]+ (Mobile Safari|Safari)\/[0-9.]+ Edge\/[0-9.]+$/';