Showing 4,504 of 4,504 total issues
File DBConfigService.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Robin Appelman <icewind@owncloud.com>
Function loadStorages
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadStorages: function() {
var self = this;
var ajaxRequests = [];
if (this._isPersonal) {
Function attach
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
attach: function(fileList) {
var self = this;
if (this.ignoreLists.indexOf(fileList.id) >= 0) {
return;
}
Method getInternalDriveFile
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getInternalDriveFile($path) {
// Remove leading and trailing slashes
$path = \trim($path, '/');
if ($path === '.') {
$path = '';
Method writeExtra
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function writeExtra($app, $message, $level, $conditionalLogFile, $extraFields = []) {
$config = \OC::$server->getSystemConfig();
// default to ISO8601
$format = $config->getValue('logdateformat', 'c');
Method delete
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function delete($parent, $excludeParent = false, $uidOwner = null, $newParent = null, $excludeGroupChildren = false) {
$ids = [$parent];
$deletedItems = [];
$changeParent = [];
$parents = [$parent];
Method castValue
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function castValue($value, $type) {
switch ($type) {
case 'integer':
case 'int':
if (!\is_numeric($value)) {
Method validateInput
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function validateInput(InputInterface $input, OutputInterface $output, $supportedDatabases) {
$db = \strtolower($input->getOption('database'));
if (!\in_array($db, $supportedDatabases)) {
throw new InvalidArgumentException("Database <$db> is not supported.");
Similar blocks of code found in 2 locations. Consider refactoring. Open
$(document).on('click', '.app-description-toggle-hide', function () {
$(this).addClass('hidden');
$(this).siblings('.app-description-toggle-show').removeClass('hidden');
$(this).siblings('.app-description-container').slideUp();
});
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
exports.Apps.showAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
$appSidebar.removeClass('disappear');
$('#app-content').addClass('with-app-sidebar').trigger(new $.Event('appresized'));
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (ev.action) {
this._fileList.fileActions.registerAction(ev.action);
} else if (ev.defaultAction) {
this._fileList.fileActions.setDefault(
ev.defaultAction.mime,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
$(document).on('click', '.app-description-toggle-show', function () {
$(this).addClass('hidden');
$(this).siblings('.app-description-toggle-hide').removeClass('hidden');
$(this).siblings('.app-description-container').slideDown();
});
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
exports.Apps.hideAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
$appSidebar.addClass('disappear');
$('#app-content').removeClass('with-app-sidebar').trigger(new $.Event('appresized'));
};
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (ev.action) {
this.favoritesFileList.fileActions.registerAction(ev.action);
} else if (ev.defaultAction) {
this.favoritesFileList.fileActions.setDefault(
ev.defaultAction.mime,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 82.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File setupchecks.js
has 264 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 user.php
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Aldo "xoen" Giambelluca <xoen@xoen.org>
* @author Andreas Fischer <bantu@owncloud.com>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
File Manager.php
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
EmptyContentSecurityPolicy
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class EmptyContentSecurityPolicy {
/** @var bool Whether inline JS snippets are allowed */
protected $inlineScriptAllowed = null;
/**
* @var bool Whether eval in JS scripts is allowed
Manager
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Manager extends PublicEmitter implements IGroupManager {
/**
* @var GroupInterface[] $backends
*/
private $backends = [];
Event
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Event implements IEvent {
/** @var array */
protected $data = [
'app' => null,
'type' => null,